Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Unified Diff: chrome/browser/extensions/api/automation/automation_apitest.cc

Issue 667713006: Implement automatic load of composed/embedded automation trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Fix UAF Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/automation/automation_apitest.cc
diff --git a/chrome/browser/extensions/api/automation/automation_apitest.cc b/chrome/browser/extensions/api/automation/automation_apitest.cc
index 87ce614914bc193fe566c2efcfcfa41d3196ff2d..5d3bd57843e54e7182042964e8205b4254bf9025 100644
--- a/chrome/browser/extensions/api/automation/automation_apitest.cc
+++ b/chrome/browser/extensions/api/automation/automation_apitest.cc
@@ -159,6 +159,11 @@ IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopActions) {
ASSERT_TRUE(RunExtensionSubtest("automation/tests/desktop", "actions.html"))
<< message_;
}
+
+IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopLoadTabs) {
+ ASSERT_TRUE(RunExtensionSubtest("automation/tests/desktop", "load_tabs.html"))
+ << message_;
+}
#else
IN_PROC_BROWSER_TEST_F(AutomationApiTest, DesktopNotSupported) {
ASSERT_TRUE(RunExtensionSubtest("automation/tests/desktop",
@@ -336,9 +341,9 @@ class FakeAutomationInternalEnableTabFunction
base::Bind(&TreeSerializationState::InitializeTree0,
base::Unretained(&state),
base::Unretained(browser_context())));
- return RespondNow(
- ArgumentList(api::automation_internal::EnableTab::Results::Create(
- kPid, kTab0Rid)));
+ // TODO(aboxhall): Need to rewrite this test in terms of tree ids.
+ return RespondNow(ArgumentList(
+ api::automation_internal::EnableTab::Results::Create(0)));
}
if (tab_id == 1) {
// tab 1 <--> tree1
@@ -347,9 +352,8 @@ class FakeAutomationInternalEnableTabFunction
base::Bind(&TreeSerializationState::InitializeTree1,
base::Unretained(&state),
base::Unretained(browser_context())));
- return RespondNow(
- ArgumentList(api::automation_internal::EnableTab::Results::Create(
- kPid, kTab1Rid)));
+ return RespondNow(ArgumentList(
+ api::automation_internal::EnableTab::Results::Create(0)));
}
return RespondNow(Error("Unrecognised tab_id"));
}

Powered by Google App Engine
This is Rietveld 408576698