summaryrefslogtreecommitdiff
path: root/chrome/test
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2014-04-16 11:17:03 +0100
committerBen Murdoch <benm@google.com>2014-04-16 11:17:03 +0100
commita02191e04bc25c4935f804f2c080ae28663d096d (patch)
tree3cf38961650b5734763e473336009287244306ac /chrome/test
parent8bad47e0f7d0c250a0443923cceb52f4a4abcd40 (diff)
downloadchromium_org-a02191e04bc25c4935f804f2c080ae28663d096d.tar.gz
Merge from Chromium at DEPS revision 263965
This commit was generated by merge_to_master.py. Change-Id: Ia1121eddd985123f160afde6372525c3d25975bf
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/android/javatests/src/org/chromium/chrome/test/util/TabUtils.java2
-rw-r--r--chrome/test/base/browser_with_test_window_test.cc12
-rw-r--r--chrome/test/base/chrome_render_view_test.cc6
-rw-r--r--chrome/test/base/in_process_browser_test.cc2
-rw-r--r--chrome/test/base/interactive_test_utils.h2
-rw-r--r--chrome/test/base/interactive_test_utils_gtk.cc84
-rw-r--r--chrome/test/base/module_system_test.cc4
-rw-r--r--chrome/test/base/module_system_test.h2
-rw-r--r--chrome/test/base/testing_profile.cc3
-rw-r--r--chrome/test/chromedriver/archive.py2
-rw-r--r--chrome/test/chromedriver/chrome/version.cc2
-rw-r--r--chrome/test/chromedriver/client/chromedriver.py3
-rw-r--r--chrome/test/chromedriver/client/command_executor.py1
-rw-r--r--chrome/test/chromedriver/server/http_handler.cc5
-rw-r--r--chrome/test/chromedriver/session.cc5
-rw-r--r--chrome/test/chromedriver/session.h1
-rw-r--r--chrome/test/chromedriver/session_unittest.cc45
-rwxr-xr-xchrome/test/chromedriver/test/run_all_tests.py4
-rwxr-xr-xchrome/test/chromedriver/test/run_py_tests.py12
-rw-r--r--chrome/test/chromedriver/test/test_expectations3
-rw-r--r--chrome/test/chromedriver/window_commands.cc9
-rw-r--r--chrome/test/chromedriver/window_commands.h7
-rw-r--r--chrome/test/gpu/webgl_infobar_browsertest.cc10
-rw-r--r--chrome/test/ppapi/ppapi_browsertest.cc89
-rw-r--r--chrome/test/ppapi/ppapi_test.cc18
-rw-r--r--chrome/test/ppapi/ppapi_test.h7
-rw-r--r--chrome/test/remoting/remote_desktop_browsertest.cc1
27 files changed, 209 insertions, 132 deletions
diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/util/TabUtils.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/TabUtils.java
index 0c910d7c0b..c8429b9551 100644
--- a/chrome/test/android/javatests/src/org/chromium/chrome/test/util/TabUtils.java
+++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/TabUtils.java
@@ -26,7 +26,7 @@ public class TabUtils {
if (client instanceof TestContentViewClient) return (TestContentViewClient) client;
TestContentViewClient testClient = new TestContentViewClientWrapper(client);
- tab.getContentView().setContentViewClient(testClient);
+ tab.getContentViewCore().setContentViewClient(testClient);
return testClient;
}
diff --git a/chrome/test/base/browser_with_test_window_test.cc b/chrome/test/base/browser_with_test_window_test.cc
index 47d682b1c6..c45f7fa709 100644
--- a/chrome/test/base/browser_with_test_window_test.cc
+++ b/chrome/test/base/browser_with_test_window_test.cc
@@ -226,10 +226,16 @@ Browser* BrowserWithTestWindowTest::CreateBrowser(
chrome::HostDesktopType host_desktop_type,
BrowserWindow* browser_window) {
Browser::CreateParams params(profile, host_desktop_type);
- params.type = browser_type;
+ if (hosted_app) {
+ params = Browser::CreateParams::CreateForApp("Test",
+ true /* trusted_source */,
+ gfx::Rect(),
+ profile,
+ host_desktop_type);
+ } else {
+ params.type = browser_type;
+ }
params.window = browser_window;
- if (hosted_app)
- params.app_name = "Test";
return new Browser(params);
}
diff --git a/chrome/test/base/chrome_render_view_test.cc b/chrome/test/base/chrome_render_view_test.cc
index 7e435a26e4..abf053cbd0 100644
--- a/chrome/test/base/chrome_render_view_test.cc
+++ b/chrome/test/base/chrome_render_view_test.cc
@@ -12,7 +12,6 @@
#include "chrome/renderer/extensions/chrome_v8_context_set.h"
#include "chrome/renderer/extensions/chrome_v8_extension.h"
#include "chrome/renderer/extensions/dispatcher.h"
-#include "chrome/renderer/extensions/event_bindings.h"
#include "chrome/renderer/spellchecker/spellcheck.h"
#include "chrome/test/base/chrome_unit_test_suite.h"
#include "components/autofill/content/renderer/autofill_agent.h"
@@ -24,6 +23,7 @@
#include "content/public/renderer/render_view.h"
#include "extensions/browser/extension_function_dispatcher.h"
#include "extensions/common/extension.h"
+#include "extensions/renderer/event_bindings.h"
#include "grit/renderer_resources.h"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
#include "third_party/WebKit/public/web/WebFrame.h"
@@ -33,10 +33,6 @@
#include "third_party/WebKit/public/web/WebScriptSource.h"
#include "third_party/WebKit/public/web/WebView.h"
-#if defined(OS_LINUX) && !defined(USE_AURA)
-#include "ui/base/gtk/event_synthesis_gtk.h"
-#endif
-
using blink::WebFrame;
using blink::WebInputEvent;
using blink::WebMouseEvent;
diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc
index 67555edadb..b8b3efd385 100644
--- a/chrome/test/base/in_process_browser_test.cc
+++ b/chrome/test/base/in_process_browser_test.cc
@@ -325,7 +325,7 @@ Browser* InProcessBrowserTest::CreateBrowserForApp(
Profile* profile) {
Browser* browser = new Browser(
Browser::CreateParams::CreateForApp(
- Browser::TYPE_POPUP, app_name, gfx::Rect(), profile,
+ app_name, false /* trusted_source */, gfx::Rect(), profile,
chrome::GetActiveDesktop()));
AddBlankTabAndShow(browser);
return browser;
diff --git a/chrome/test/base/interactive_test_utils.h b/chrome/test/base/interactive_test_utils.h
index ddab764cf0..c7ada3cd56 100644
--- a/chrome/test/base/interactive_test_utils.h
+++ b/chrome/test/base/interactive_test_utils.h
@@ -124,8 +124,6 @@ bool SendKeyPressAndWaitWithDetails(
void MoveMouseToCenterAndPress(
#if defined(TOOLKIT_VIEWS)
views::View* view,
-#elif defined(TOOLKIT_GTK)
- GtkWidget* widget,
#elif defined(OS_IOS)
UIView* view,
#elif defined(OS_MACOSX)
diff --git a/chrome/test/base/interactive_test_utils_gtk.cc b/chrome/test/base/interactive_test_utils_gtk.cc
deleted file mode 100644
index 53af8fe5c5..0000000000
--- a/chrome/test/base/interactive_test_utils_gtk.cc
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/test/base/interactive_test_utils.h"
-
-#include <gtk/gtk.h>
-
-#include "base/bind.h"
-#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
-#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_window.h"
-#include "chrome/browser/ui/gtk/view_id_util.h"
-#include "ui/base/gtk/gtk_screen_util.h"
-#include "ui/base/test/ui_controls.h"
-
-namespace ui_test_utils {
-
-namespace {
-// Check if the focused widget for |root| is |target| or a child of |target|.
-static bool IsWidgetInFocusChain(GtkWidget* root, GtkWidget* target) {
- GtkWidget* iter = root;
-
- while (iter) {
- if (iter == target)
- return true;
-
- if (!GTK_IS_CONTAINER(iter))
- return false;
-
- iter = GTK_CONTAINER(iter)->focus_child;
- }
-
- return false;
-}
-} // namespace
-
-bool IsViewFocused(const Browser* browser, ViewID vid) {
- BrowserWindow* browser_window = browser->window();
- DCHECK(browser_window);
- gfx::NativeWindow window = browser_window->GetNativeWindow();
- DCHECK(window);
- GtkWidget* widget = ViewIDUtil::GetWidget(GTK_WIDGET(window), vid);
- DCHECK(widget);
- return IsWidgetInFocusChain(GTK_WIDGET(window), widget);
-}
-
-void ClickOnView(const Browser* browser, ViewID vid) {
- BrowserWindow* browser_window = browser->window();
- DCHECK(browser_window);
- gfx::NativeWindow window = browser_window->GetNativeWindow();
- DCHECK(window);
- GtkWidget* view = ViewIDUtil::GetWidget(GTK_WIDGET(window), vid);
- DCHECK(view);
- MoveMouseToCenterAndPress(view,
- ui_controls::LEFT,
- ui_controls::DOWN | ui_controls::UP,
- base::MessageLoop::QuitClosure());
- content::RunMessageLoop();
-}
-
-void HideNativeWindow(gfx::NativeWindow window) {
- gtk_widget_hide(GTK_WIDGET(window));
-}
-
-bool ShowAndFocusNativeWindow(gfx::NativeWindow window) {
- if (!gtk_window_has_toplevel_focus(GTK_WINDOW(window)))
- gtk_window_present(GTK_WINDOW(window));
- return true;
-}
-
-void MoveMouseToCenterAndPress(GtkWidget* widget,
- ui_controls::MouseButton button,
- int state,
- const base::Closure& task) {
- gfx::Rect bounds = ui::GetWidgetScreenBounds(widget);
- ui_controls::SendMouseMoveNotifyWhenDone(
- bounds.x() + bounds.width() / 2,
- bounds.y() + bounds.height() / 2,
- base::Bind(&internal::ClickTask, button, state, task));
-}
-
-} // namespace ui_test_utils
diff --git a/chrome/test/base/module_system_test.cc b/chrome/test/base/module_system_test.cc
index 7d43e67333..69976bae17 100644
--- a/chrome/test/base/module_system_test.cc
+++ b/chrome/test/base/module_system_test.cc
@@ -15,9 +15,9 @@
#include "chrome/common/chrome_paths.h"
#include "chrome/renderer/extensions/chrome_v8_context.h"
#include "chrome/renderer/extensions/logging_native_handler.h"
-#include "chrome/renderer/extensions/object_backed_native_handler.h"
-#include "chrome/renderer/extensions/safe_builtins.h"
#include "chrome/renderer/extensions/utils_native_handler.h"
+#include "extensions/renderer/object_backed_native_handler.h"
+#include "extensions/renderer/safe_builtins.h"
#include "ui/base/resource/resource_bundle.h"
#include <map>
diff --git a/chrome/test/base/module_system_test.h b/chrome/test/base/module_system_test.h
index 4a2959efc2..8402d57b39 100644
--- a/chrome/test/base/module_system_test.h
+++ b/chrome/test/base/module_system_test.h
@@ -6,7 +6,7 @@
#define CHROME_TEST_BASE_MODULE_SYSTEM_TEST_H_
#include "chrome/renderer/extensions/chrome_v8_context.h"
-#include "chrome/renderer/extensions/module_system.h"
+#include "extensions/renderer/module_system.h"
#include "extensions/renderer/scoped_persistent.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "v8/include/v8.h"
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index 11886bbc37..9d53560c57 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -56,6 +56,7 @@
#include "chrome/test/base/history_index_restore_observer.h"
#include "chrome/test/base/testing_pref_service_syncable.h"
#include "chrome/test/base/ui_test_utils.h"
+#include "components/bookmarks/core/common/bookmark_constants.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
#include "components/policy/core/common/policy_service.h"
#include "components/user_prefs/user_prefs.h"
@@ -500,7 +501,7 @@ static KeyedService* BuildBookmarkModel(content::BrowserContext* context) {
void TestingProfile::CreateBookmarkModel(bool delete_file) {
if (delete_file) {
- base::FilePath path = GetPath().Append(chrome::kBookmarksFileName);
+ base::FilePath path = GetPath().Append(bookmarks::kBookmarksFileName);
base::DeleteFile(path, false);
}
// This will create a bookmark model.
diff --git a/chrome/test/chromedriver/archive.py b/chrome/test/chromedriver/archive.py
index aaebe8c32d..29e3982c95 100644
--- a/chrome/test/chromedriver/archive.py
+++ b/chrome/test/chromedriver/archive.py
@@ -10,9 +10,9 @@ import urllib
import util
-CHROME_31_REVISION = '225096'
CHROME_32_REVISION = '232870'
CHROME_33_REVISION = '241075'
+CHROME_34_REVISION = '251854'
_SITE = 'http://commondatastorage.googleapis.com'
diff --git a/chrome/test/chromedriver/chrome/version.cc b/chrome/test/chromedriver/chrome/version.cc
index 249e7b6f4e..d3d13accc5 100644
--- a/chrome/test/chromedriver/chrome/version.cc
+++ b/chrome/test/chromedriver/chrome/version.cc
@@ -9,7 +9,7 @@
namespace {
// This variable must be able to be found and parsed by the upload script.
-const int kMinimumSupportedChromeVersion[] = {31, 0, 1650, 59};
+const int kMinimumSupportedChromeVersion[] = {32, 0, 1700, 0};
} // namespace
diff --git a/chrome/test/chromedriver/client/chromedriver.py b/chrome/test/chromedriver/client/chromedriver.py
index 824dd8e0c6..946f85cbaf 100644
--- a/chrome/test/chromedriver/client/chromedriver.py
+++ b/chrome/test/chromedriver/client/chromedriver.py
@@ -198,6 +198,9 @@ class ChromeDriver(object):
def SwitchToMainFrame(self):
self.SwitchToFrame(None)
+ def SwitchToParentFrame(self):
+ self.ExecuteCommand(Command.SWITCH_TO_PARENT_FRAME)
+
def GetTitle(self):
return self.ExecuteCommand(Command.GET_TITLE)
diff --git a/chrome/test/chromedriver/client/command_executor.py b/chrome/test/chromedriver/client/command_executor.py
index d2421b8f8a..98d5e97b6b 100644
--- a/chrome/test/chromedriver/client/command_executor.py
+++ b/chrome/test/chromedriver/client/command_executor.py
@@ -70,6 +70,7 @@ class Command(object):
DELETE_ALL_COOKIES = (_Method.DELETE, '/session/:sessionId/cookie')
DELETE_COOKIE = (_Method.DELETE, '/session/:sessionId/cookie/:name')
SWITCH_TO_FRAME = (_Method.POST, '/session/:sessionId/frame')
+ SWITCH_TO_PARENT_FRAME = (_Method.POST, '/session/:sessionId/frame/parent')
SWITCH_TO_WINDOW = (_Method.POST, '/session/:sessionId/window')
GET_WINDOW_SIZE = (
_Method.GET, '/session/:sessionId/window/:windowHandle/size')
diff --git a/chrome/test/chromedriver/server/http_handler.cc b/chrome/test/chromedriver/server/http_handler.cc
index 354c3f2145..6b6c9aed0b 100644
--- a/chrome/test/chromedriver/server/http_handler.cc
+++ b/chrome/test/chromedriver/server/http_handler.cc
@@ -303,6 +303,11 @@ HttpHandler::HttpHandler(
WrapToCommand("SwitchToFrame", base::Bind(&ExecuteSwitchToFrame))),
CommandMapping(
kPost,
+ "session/:sessionId/frame/parent",
+ WrapToCommand("SwitchToParentFrame",
+ base::Bind(&ExecuteSwitchToParentFrame))),
+ CommandMapping(
+ kPost,
"session/:sessionId/window",
WrapToCommand("SwitchToWindow", base::Bind(&ExecuteSwitchToWindow))),
CommandMapping(
diff --git a/chrome/test/chromedriver/session.cc b/chrome/test/chromedriver/session.cc
index 91370da1d3..d46918e0d0 100644
--- a/chrome/test/chromedriver/session.cc
+++ b/chrome/test/chromedriver/session.cc
@@ -69,6 +69,11 @@ void Session::SwitchToTopFrame() {
frames.clear();
}
+void Session::SwitchToParentFrame() {
+ if (!frames.empty())
+ frames.pop_back();
+}
+
void Session::SwitchToSubFrame(const std::string& frame_id,
const std::string& chromedriver_frame_id) {
std::string parent_frame_id;
diff --git a/chrome/test/chromedriver/session.h b/chrome/test/chromedriver/session.h
index d890690c24..38c59e21d5 100644
--- a/chrome/test/chromedriver/session.h
+++ b/chrome/test/chromedriver/session.h
@@ -45,6 +45,7 @@ struct Session {
Status GetTargetWindow(WebView** web_view);
void SwitchToTopFrame();
+ void SwitchToParentFrame();
void SwitchToSubFrame(const std::string& frame_id,
const std::string& chromedriver_frame_id);
std::string GetCurrentFrameId() const;
diff --git a/chrome/test/chromedriver/session_unittest.cc b/chrome/test/chromedriver/session_unittest.cc
index 8f0afb2649..23fb779bd2 100644
--- a/chrome/test/chromedriver/session_unittest.cc
+++ b/chrome/test/chromedriver/session_unittest.cc
@@ -56,3 +56,48 @@ TEST(Session, GetTargetWindowTargetWindowStillOpen) {
ASSERT_EQ(kOk, session.GetTargetWindow(&web_view).code());
ASSERT_TRUE(web_view);
}
+
+TEST(Session, SwitchToParentFrame) {
+ scoped_ptr<Chrome> chrome(new MockChrome());
+ Session session("1", chrome.Pass());
+
+ // Initial frame should be top frame.
+ ASSERT_EQ(std::string(), session.GetCurrentFrameId());
+
+ // Switching to parent frame should be a no-op.
+ session.SwitchToParentFrame();
+ ASSERT_EQ(std::string(), session.GetCurrentFrameId());
+
+ session.SwitchToSubFrame("1.1", std::string());
+ ASSERT_EQ("1.1", session.GetCurrentFrameId());
+ session.SwitchToParentFrame();
+ ASSERT_EQ(std::string(), session.GetCurrentFrameId());
+
+ session.SwitchToSubFrame("2.1", std::string());
+ ASSERT_EQ("2.1", session.GetCurrentFrameId());
+ session.SwitchToSubFrame("2.2", std::string());
+ ASSERT_EQ("2.2", session.GetCurrentFrameId());
+ session.SwitchToParentFrame();
+ ASSERT_EQ("2.1", session.GetCurrentFrameId());
+ session.SwitchToParentFrame();
+ ASSERT_EQ(std::string(), session.GetCurrentFrameId());
+}
+
+TEST(Session, SwitchToTopFrame) {
+ scoped_ptr<Chrome> chrome(new MockChrome());
+ Session session("1", chrome.Pass());
+
+ // Initial frame should be top frame.
+ ASSERT_EQ(std::string(), session.GetCurrentFrameId());
+
+ // Switching to top frame should be a no-op.
+ session.SwitchToTopFrame();
+ ASSERT_EQ(std::string(), session.GetCurrentFrameId());
+
+ session.SwitchToSubFrame("3.1", std::string());
+ ASSERT_EQ("3.1", session.GetCurrentFrameId());
+ session.SwitchToSubFrame("3.2", std::string());
+ ASSERT_EQ("3.2", session.GetCurrentFrameId());
+ session.SwitchToTopFrame();
+ ASSERT_EQ(std::string(), session.GetCurrentFrameId());
+}
diff --git a/chrome/test/chromedriver/test/run_all_tests.py b/chrome/test/chromedriver/test/run_all_tests.py
index d24458f4b5..434bf118ef 100755
--- a/chrome/test/chromedriver/test/run_all_tests.py
+++ b/chrome/test/chromedriver/test/run_all_tests.py
@@ -191,9 +191,9 @@ def main():
latest_snapshot_revision = archive.GetLatestRevision(archive.Site.SNAPSHOT)
versions = [
['HEAD', latest_snapshot_revision],
+ ['34', archive.CHROME_34_REVISION],
['33', archive.CHROME_33_REVISION],
- ['32', archive.CHROME_32_REVISION],
- ['31', archive.CHROME_31_REVISION]
+ ['32', archive.CHROME_32_REVISION]
]
code = 0
for version in versions:
diff --git a/chrome/test/chromedriver/test/run_py_tests.py b/chrome/test/chromedriver/test/run_py_tests.py
index 48083b2be9..0e14f116b5 100755
--- a/chrome/test/chromedriver/test/run_py_tests.py
+++ b/chrome/test/chromedriver/test/run_py_tests.py
@@ -322,6 +322,18 @@ class ChromeDriverTest(ChromeDriverBaseTest):
self._driver.SwitchToFrame(self._driver.FindElement('tag name', 'iframe'))
self.assertTrue(self._driver.ExecuteScript('return window.top != window'))
+ def testSwitchToParentFrame(self):
+ self._driver.Load(self.GetHttpUrlForFile('/chromedriver/nested.html'))
+ self.assertTrue('One' in self._driver.GetPageSource())
+ self._driver.SwitchToFrameByIndex(0)
+ self.assertTrue('Two' in self._driver.GetPageSource())
+ self._driver.SwitchToFrameByIndex(0)
+ self.assertTrue('Three' in self._driver.GetPageSource())
+ self._driver.SwitchToParentFrame()
+ self.assertTrue('Two' in self._driver.GetPageSource())
+ self._driver.SwitchToParentFrame()
+ self.assertTrue('One' in self._driver.GetPageSource())
+
def testExecuteInRemovedFrame(self):
self._driver.ExecuteScript(
'var frame = document.createElement("iframe");'
diff --git a/chrome/test/chromedriver/test/test_expectations b/chrome/test/chromedriver/test/test_expectations
index 2589bf26c6..2642f86a8c 100644
--- a/chrome/test/chromedriver/test/test_expectations
+++ b/chrome/test/chromedriver/test/test_expectations
@@ -89,9 +89,6 @@ _REVISION_NEGATIVE_FILTER['HEAD'] = [
'PageLoadingTest.testShouldBeAbleToNavigateBackInTheBrowserHistoryInPresenceOfIframes',
'PageLoadingTest.testShouldBeAbleToNavigateBackInTheBrowserHistory',
]
-_REVISION_NEGATIVE_FILTER['31'] = _REVISION_NEGATIVE_FILTER['HEAD'] + [
- 'I18nTest.*', # This was fixed in a later version of 31 than we use.
-]
_OS_NEGATIVE_FILTER = {}
diff --git a/chrome/test/chromedriver/window_commands.cc b/chrome/test/chromedriver/window_commands.cc
index 266361b4c9..eee04d4261 100644
--- a/chrome/test/chromedriver/window_commands.cc
+++ b/chrome/test/chromedriver/window_commands.cc
@@ -355,6 +355,15 @@ Status ExecuteSwitchToFrame(
return Status(kOk);
}
+Status ExecuteSwitchToParentFrame(
+ Session* session,
+ WebView* web_view,
+ const base::DictionaryValue& params,
+ scoped_ptr<base::Value>* value) {
+ session->SwitchToParentFrame();
+ return Status(kOk);
+}
+
Status ExecuteGetTitle(
Session* session,
WebView* web_view,
diff --git a/chrome/test/chromedriver/window_commands.h b/chrome/test/chromedriver/window_commands.h
index 4e97ac9f16..612906e2ca 100644
--- a/chrome/test/chromedriver/window_commands.h
+++ b/chrome/test/chromedriver/window_commands.h
@@ -60,6 +60,13 @@ Status ExecuteSwitchToFrame(
const base::DictionaryValue& params,
scoped_ptr<base::Value>* value);
+// Change focus to the parent frame.
+Status ExecuteSwitchToParentFrame(
+ Session* session,
+ WebView* web_view,
+ const base::DictionaryValue& params,
+ scoped_ptr<base::Value>* value);
+
// Get the current page title.
Status ExecuteGetTitle(
Session* session,
diff --git a/chrome/test/gpu/webgl_infobar_browsertest.cc b/chrome/test/gpu/webgl_infobar_browsertest.cc
index 9d376d3ea8..8040cae483 100644
--- a/chrome/test/gpu/webgl_infobar_browsertest.cc
+++ b/chrome/test/gpu/webgl_infobar_browsertest.cc
@@ -8,7 +8,6 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/infobars/confirm_infobar_delegate.h"
#include "chrome/browser/infobars/infobar.h"
-#include "chrome/browser/infobars/infobar_manager.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
@@ -91,8 +90,8 @@ IN_PROC_BROWSER_TEST_F(WebGLInfoBarTest, DISABLED_ContextLossRaisesInfoBar) {
infobar_added.Wait();
EXPECT_EQ(1u,
InfoBarService::FromWebContents(
- browser()->tab_strip_model()->GetActiveWebContents())
- ->infobar_manager()->infobar_count());
+ browser()->tab_strip_model()->GetActiveWebContents())->
+ infobar_count());
}
// This test is flaky. http://crbug.com/324555
@@ -132,9 +131,8 @@ IN_PROC_BROWSER_TEST_F(WebGLInfoBarTest, DISABLED_ContextLossInfoBarReload) {
infobar_added.Wait();
InfoBarService* infobar_service = InfoBarService::FromWebContents(
browser()->tab_strip_model()->GetActiveWebContents());
- ASSERT_EQ(1u, infobar_service->infobar_manager()->infobar_count());
- InfoBarDelegate* delegate =
- infobar_service->infobar_manager()->infobar_at(0)->delegate();
+ ASSERT_EQ(1u, infobar_service->infobar_count());
+ InfoBarDelegate* delegate = infobar_service->infobar_at(0)->delegate();
ASSERT_EQ(IDR_INFOBAR_3D_BLOCKED, delegate->GetIconID());
delegate->AsConfirmInfoBarDelegate()->Cancel();
diff --git a/chrome/test/ppapi/ppapi_browsertest.cc b/chrome/test/ppapi/ppapi_browsertest.cc
index 5f1ba920ee..216824f131 100644
--- a/chrome/test/ppapi/ppapi_browsertest.cc
+++ b/chrome/test/ppapi/ppapi_browsertest.cc
@@ -65,6 +65,13 @@ using content::RenderViewHost;
#define MAYBE_GLIBC(test_name) DISABLED_##test_name
#endif
+// The NonSFI test is currently available only on linux-x86-32 architecture.
+#if defined(OS_LINUX) && defined(ARCH_CPU_X86)
+#define MAYBE_NONSFI(test_name) test_name
+#else
+#define MAYBE_NONSFI(test_name) DISABLED_##test_name
+#endif
+
#if defined(DISABLE_NACL)
#define TEST_PPAPI_NACL(test_name)
@@ -83,6 +90,10 @@ using content::RenderViewHost;
} \
IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, test_name) { \
RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
+ } \
+ IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, \
+ MAYBE_NONSFI(test_name)) { \
+ RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
}
// NaCl based PPAPI tests with disallowed socket API
@@ -101,6 +112,10 @@ using content::RenderViewHost;
} \
IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, test_name) { \
RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \
+ } \
+ IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, \
+ MAYBE_NONSFI(test_name)) { \
+ RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \
}
#endif // DISABLE_NACL
@@ -191,16 +206,6 @@ TEST_PPAPI_IN_PROCESS(MAYBE_Core)
TEST_PPAPI_OUT_OF_PROCESS(MAYBE_Core)
TEST_PPAPI_NACL(MAYBE_Core)
-// The NonSFI test is currently available only on linux-x86-32 architecture.
-// Currently PPAPINaClPNaClNonSfiTest is under development. So only Core
-// is enabled on it.
-// TODO(hidehiko): Enable other tests, too.
-#if defined(OS_LINUX) && defined(ARCH_CPU_X86)
-IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, Core) {
- RunTestViaHTTP(STRIP_PREFIXES(Core));
-}
-#endif
-
TEST_PPAPI_IN_PROCESS(TraceEvent)
TEST_PPAPI_OUT_OF_PROCESS(TraceEvent)
TEST_PPAPI_NACL(TraceEvent)
@@ -346,6 +351,9 @@ IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(TCPSocket)) {
IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, TCPSocket) {
RUN_TCPSOCKET_SUBTESTS;
}
+IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, MAYBE_NONSFI(TCPSocket)) {
+ RUN_TCPSOCKET_SUBTESTS;
+}
TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(TCPServerSocketPrivate)
TEST_PPAPI_NACL(TCPServerSocketPrivate)
@@ -383,6 +391,9 @@ IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(UDPSocket)) {
IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, UDPSocket) {
RUN_UDPSOCKET_SUBTESTS;
}
+IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, MAYBE_NONSFI(UDPSocket)) {
+ RUN_UDPSOCKET_SUBTESTS;
+}
// UDPSocketPrivate tests.
@@ -427,6 +438,9 @@ IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(HostResolver)) {
IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, HostResolver) {
RUN_HOST_RESOLVER_SUBTESTS;
}
+IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, MAYBE_NONSFI(HostResolver)) {
+ RUN_HOST_RESOLVER_SUBTESTS;
+}
TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(HostResolverPrivate_Resolve)
TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(HostResolverPrivate_ResolveIPv4)
@@ -569,6 +583,18 @@ IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, URLLoader2) {
IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, URLLoader3) {
RUN_URLLOADER_SUBTESTS_3;
}
+IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, MAYBE_NONSFI(URLLoader0)) {
+ RUN_URLLOADER_SUBTESTS_0;
+}
+IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, MAYBE_NONSFI(URLLoader1)) {
+ RUN_URLLOADER_SUBTESTS_1;
+}
+IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, MAYBE_NONSFI(URLLoader2)) {
+ RUN_URLLOADER_SUBTESTS_2;
+}
+IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, MAYBE_NONSFI(URLLoader3)) {
+ RUN_URLLOADER_SUBTESTS_3;
+}
// URLRequestInfo tests.
TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLRequest_CreateAndIsURLRequestInfo)
@@ -692,6 +718,9 @@ IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(PostMessage)) {
IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, PostMessage) {
RUN_POSTMESSAGE_SUBTESTS;
}
+IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, MAYBE_NONSFI(PostMessage)) {
+ RUN_POSTMESSAGE_SUBTESTS;
+}
TEST_PPAPI_IN_PROCESS(Memory)
TEST_PPAPI_OUT_OF_PROCESS(Memory)
@@ -783,6 +812,14 @@ IN_PROC_BROWSER_TEST_F(PPAPIPrivateNaClPNaClTest, MAYBE_PNaCl_FileIO_Private) {
RUN_FILEIO_PRIVATE_SUBTESTS;
}
+IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, MAYBE_NONSFI(FileIO)) {
+ RUN_FILEIO_SUBTESTS;
+}
+IN_PROC_BROWSER_TEST_F(PPAPIPrivateNaClPNaClTest,
+ MAYBE_NONSFI(FILEIO_Private)) {
+ RUN_FILEIO_PRIVATE_SUBTESTS;
+}
+
// PPB_FileMapping is only implemented on POSIX currently.
// http://crbug.com/83774
#if defined(OS_WIN)
@@ -857,6 +894,12 @@ IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, FileRef1) {
IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, FileRef2) {
RUN_FILEREF_SUBTESTS_2;
}
+IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, MAYBE_NONSFI(FileRef1)) {
+ RUN_FILEREF_SUBTESTS_1;
+}
+IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, MAYBE_NONSFI(FileRef2)) {
+ RUN_FILEREF_SUBTESTS_2;
+}
TEST_PPAPI_IN_PROCESS_VIA_HTTP(FileSystem)
TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(FileSystem)
@@ -914,6 +957,9 @@ IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(NetAddress)) {
IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, NetAddress) {
RUN_NETADDRESS_SUBTESTS;
}
+IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, MAYBE_NONSFI(NetAddress)) {
+ RUN_NETADDRESS_SUBTESTS;
+}
// NetAddressPrivate tests.
#define RUN_NETADDRESS_PRIVATE_SUBTESTS \
@@ -958,6 +1004,10 @@ IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(NetAddressPrivate)) {
IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, NetAddressPrivate) {
RUN_NETADDRESS_PRIVATE_UNTRUSTED_SUBTESTS;
}
+IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest,
+ MAYBE_NONSFI(NetAddressPrivate)) {
+ RUN_NETADDRESS_PRIVATE_UNTRUSTED_SUBTESTS;
+}
// NetworkMonitor tests.
#define RUN_NETWORK_MONITOR_SUBTESTS \
@@ -979,6 +1029,10 @@ IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(NetworkMonitor)) {
IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, NetworkMonitor) {
RUN_NETWORK_MONITOR_SUBTESTS;
}
+IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest,
+ MAYBE_NONSFI(NetworkMonitor)) {
+ RUN_NETWORK_MONITOR_SUBTESTS;
+}
// Flash tests.
#define RUN_FLASH_SUBTESTS \
@@ -1064,6 +1118,12 @@ IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, WebSocket1) {
IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, WebSocket2) {
RUN_WEBSOCKET_SUBTESTS_2;
}
+IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, MAYBE_NONSFI(WebSocket1)) {
+ RUN_WEBSOCKET_SUBTESTS_1;
+}
+IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, MAYBE_NONSFI(WebSocket2)) {
+ RUN_WEBSOCKET_SUBTESTS_2;
+}
// AudioConfig tests
#define RUN_AUDIO_CONFIG_SUBTESTS \
@@ -1088,6 +1148,9 @@ IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(AudioConfig)) {
IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, AudioConfig) {
RUN_AUDIO_CONFIG_SUBTESTS;
}
+IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, MAYBE_NONSFI(AudioConfig)) {
+ RUN_AUDIO_CONFIG_SUBTESTS;
+}
// PPB_Audio tests.
#define RUN_AUDIO_SUBTESTS \
@@ -1114,6 +1177,9 @@ IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(Audio)) {
IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, Audio) {
RUN_AUDIO_SUBTESTS;
}
+IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, MAYBE_NONSFI(Audio)) {
+ RUN_AUDIO_SUBTESTS;
+}
TEST_PPAPI_IN_PROCESS(View_CreatedVisible);
TEST_PPAPI_OUT_OF_PROCESS(View_CreatedVisible);
@@ -1203,6 +1269,9 @@ IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(View)) {
IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, View) {
RUN_VIEW_SUBTESTS;
}
+IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClNonSfiTest, MAYBE_NONSFI(View)) {
+ RUN_VIEW_SUBTESTS;
+}
// FlashMessageLoop tests.
#define RUN_FLASH_MESSAGE_LOOP_SUBTESTS \
diff --git a/chrome/test/ppapi/ppapi_test.cc b/chrome/test/ppapi/ppapi_test.cc
index 99d233dc06..70a5bc1606 100644
--- a/chrome/test/ppapi/ppapi_test.cc
+++ b/chrome/test/ppapi/ppapi_test.cc
@@ -13,7 +13,6 @@
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/infobars/confirm_infobar_delegate.h"
#include "chrome/browser/infobars/infobar.h"
-#include "chrome/browser/infobars/infobar_manager.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
@@ -112,13 +111,12 @@ void PPAPITestBase::InfoBarObserver::VerifyInfoBarState() {
InfoBarService::FromWebContents(web_contents);
ASSERT_TRUE(infobar_service != NULL);
- InfoBarManager* infobar_manager = infobar_service->infobar_manager();
- EXPECT_EQ(expecting_infobar_ ? 1U : 0U, infobar_manager->infobar_count());
+ EXPECT_EQ(expecting_infobar_ ? 1U : 0U, infobar_service->infobar_count());
if (!expecting_infobar_)
return;
expecting_infobar_ = false;
- InfoBar* infobar = infobar_manager->infobar_at(0);
+ InfoBar* infobar = infobar_service->infobar_at(0);
ConfirmInfoBarDelegate* delegate =
infobar->delegate()->AsConfirmInfoBarDelegate();
ASSERT_TRUE(delegate != NULL);
@@ -127,7 +125,7 @@ void PPAPITestBase::InfoBarObserver::VerifyInfoBarState() {
else
delegate->Cancel();
- infobar_manager->RemoveInfoBar(infobar);
+ infobar_service->RemoveInfoBar(infobar);
}
PPAPITestBase::PPAPITestBase() {
@@ -447,6 +445,12 @@ std::string PPAPINaClPNaClTest::BuildQuery(const std::string& base,
test_case.c_str());
}
+void PPAPIPrivateNaClPNaClTest::SetUpCommandLine(
+ base::CommandLine* command_line) {
+ PPAPINaClPNaClTest::SetUpCommandLine(command_line);
+ AddPrivateSwitches(command_line);
+}
+
void PPAPINaClPNaClNonSfiTest::SetUpCommandLine(
base::CommandLine* command_line) {
PPAPINaClTest::SetUpCommandLine(command_line);
@@ -460,9 +464,9 @@ std::string PPAPINaClPNaClNonSfiTest::BuildQuery(
base.c_str(), test_case.c_str());
}
-void PPAPIPrivateNaClPNaClTest::SetUpCommandLine(
+void PPAPIPrivateNaClPNaClNonSfiTest::SetUpCommandLine(
base::CommandLine* command_line) {
- PPAPINaClPNaClTest::SetUpCommandLine(command_line);
+ PPAPINaClPNaClNonSfiTest::SetUpCommandLine(command_line);
AddPrivateSwitches(command_line);
}
diff --git a/chrome/test/ppapi/ppapi_test.h b/chrome/test/ppapi/ppapi_test.h
index 7f6d18dc27..d81a9f8154 100644
--- a/chrome/test/ppapi/ppapi_test.h
+++ b/chrome/test/ppapi/ppapi_test.h
@@ -175,6 +175,11 @@ class PPAPINaClPNaClTest : public PPAPINaClTest {
const std::string& test_case) OVERRIDE;
};
+class PPAPIPrivateNaClPNaClTest : public PPAPINaClPNaClTest {
+ protected:
+ virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE;
+};
+
// Test Non-SFI Mode, using PNaCl toolchain to produce nexes.
class PPAPINaClPNaClNonSfiTest : public PPAPINaClTest {
public:
@@ -184,7 +189,7 @@ class PPAPINaClPNaClNonSfiTest : public PPAPINaClTest {
const std::string& test_case) OVERRIDE;
};
-class PPAPIPrivateNaClPNaClTest : public PPAPINaClPNaClTest {
+class PPAPIPrivateNaClPNaClNonSfiTest : public PPAPINaClPNaClNonSfiTest {
protected:
virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE;
};
diff --git a/chrome/test/remoting/remote_desktop_browsertest.cc b/chrome/test/remoting/remote_desktop_browsertest.cc
index e137ddd89e..098e8aeced 100644
--- a/chrome/test/remoting/remote_desktop_browsertest.cc
+++ b/chrome/test/remoting/remote_desktop_browsertest.cc
@@ -9,7 +9,6 @@
#include "chrome/browser/extensions/unpacked_installer.h"
#include "chrome/browser/ui/extensions/application_launch.h"
#include "chrome/common/chrome_switches.h"
-#include "chrome/common/extensions/extension_file_util.h"
#include "chrome/test/remoting/key_code_conv.h"
#include "chrome/test/remoting/page_load_notification_observer.h"
#include "chrome/test/remoting/waiter.h"