OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
8 #include "chrome/browser/extensions/api/automation_internal/automation_util.h" | 8 #include "chrome/browser/extensions/api/automation_internal/automation_util.h" |
9 #include "chrome/browser/extensions/chrome_extension_function.h" | 9 #include "chrome/browser/extensions/chrome_extension_function.h" |
10 #include "chrome/browser/extensions/extension_apitest.h" | 10 #include "chrome/browser/extensions/extension_apitest.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 base::FilePath test_data; | 57 base::FilePath test_data; |
58 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data)); | 58 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data)); |
59 embedded_test_server()->ServeFilesFromDirectory( | 59 embedded_test_server()->ServeFilesFromDirectory( |
60 test_data.AppendASCII("extensions/api_test") | 60 test_data.AppendASCII("extensions/api_test") |
61 .AppendASCII(kSitesDir)); | 61 .AppendASCII(kSitesDir)); |
62 ASSERT_TRUE(ExtensionApiTest::StartEmbeddedTestServer()); | 62 ASSERT_TRUE(ExtensionApiTest::StartEmbeddedTestServer()); |
63 host_resolver()->AddRule("*", embedded_test_server()->base_url().host()); | 63 host_resolver()->AddRule("*", embedded_test_server()->base_url().host()); |
64 } | 64 } |
65 | 65 |
66 public: | 66 public: |
67 virtual void SetUpInProcessBrowserTestFixture() override { | 67 void SetUpInProcessBrowserTestFixture() override { |
68 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); | 68 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); |
69 } | 69 } |
70 }; | 70 }; |
71 | 71 |
72 IN_PROC_BROWSER_TEST_F(AutomationApiTest, TestRendererAccessibilityEnabled) { | 72 IN_PROC_BROWSER_TEST_F(AutomationApiTest, TestRendererAccessibilityEnabled) { |
73 StartEmbeddedTestServer(); | 73 StartEmbeddedTestServer(); |
74 const GURL url = GetURLForPath(kDomain, "/index.html"); | 74 const GURL url = GetURLForPath(kDomain, "/index.html"); |
75 ui_test_utils::NavigateToURL(browser(), url); | 75 ui_test_utils::NavigateToURL(browser(), url); |
76 | 76 |
77 ASSERT_EQ(1, browser()->tab_strip_model()->count()); | 77 ASSERT_EQ(1, browser()->tab_strip_model()->count()); |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 "automationInternal.enableTab", | 537 "automationInternal.enableTab", |
538 FakeAutomationInternalEnableTabFunctionFactory)); | 538 FakeAutomationInternalEnableTabFunctionFactory)); |
539 ASSERT_TRUE(extensions::ExtensionFunctionDispatcher::OverrideFunction( | 539 ASSERT_TRUE(extensions::ExtensionFunctionDispatcher::OverrideFunction( |
540 "automationInternal.performAction", | 540 "automationInternal.performAction", |
541 FakeAutomationInternalPerformActionFunctionFactory)); | 541 FakeAutomationInternalPerformActionFunctionFactory)); |
542 ASSERT_TRUE(RunExtensionSubtest("automation/tests/generated", | 542 ASSERT_TRUE(RunExtensionSubtest("automation/tests/generated", |
543 "generated_trees.html")) << message_; | 543 "generated_trees.html")) << message_; |
544 } | 544 } |
545 | 545 |
546 } // namespace extensions | 546 } // namespace extensions |
OLD | NEW |