| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/logging.h" | 5 #include "base/logging.h" |
| 6 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
| 7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 11 #include "chrome/common/chrome_switches.h" | 11 #include "chrome/common/chrome_switches.h" |
| 12 #include "chrome/test/base/ui_test_utils.h" | 12 #include "chrome/test/base/ui_test_utils.h" |
| 13 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
| 14 #include "content/public/test/browser_test_utils.h" | 14 #include "content/public/test/browser_test_utils.h" |
| 15 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
| 16 #include "net/base/mock_host_resolver.h" | 16 #include "net/dns/mock_host_resolver.h" |
| 17 | 17 |
| 18 class ExtensionIconSourceTest : public ExtensionApiTest { | 18 class ExtensionIconSourceTest : public ExtensionApiTest { |
| 19 protected: | 19 protected: |
| 20 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 20 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 21 ExtensionApiTest::SetUpCommandLine(command_line); | 21 ExtensionApiTest::SetUpCommandLine(command_line); |
| 22 command_line->AppendSwitch(switches::kAllowLegacyExtensionManifests); | 22 command_line->AppendSwitch(switches::kAllowLegacyExtensionManifests); |
| 23 } | 23 } |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 IN_PROC_BROWSER_TEST_F(ExtensionIconSourceTest, IconsLoaded) { | 26 IN_PROC_BROWSER_TEST_F(ExtensionIconSourceTest, IconsLoaded) { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // without the management permission. | 90 // without the management permission. |
| 91 ui_test_utils::OpenURLOffTheRecord( | 91 ui_test_utils::OpenURLOffTheRecord( |
| 92 browser()->profile(), | 92 browser()->profile(), |
| 93 GURL("chrome-extension://apocjbpjpkghdepdngjlknfpmabcmlao/index.html")); | 93 GURL("chrome-extension://apocjbpjpkghdepdngjlknfpmabcmlao/index.html")); |
| 94 ASSERT_TRUE(content::ExecuteScriptAndExtractString( | 94 ASSERT_TRUE(content::ExecuteScriptAndExtractString( |
| 95 otr_browser->tab_strip_model()->GetActiveWebContents(), | 95 otr_browser->tab_strip_model()->GetActiveWebContents(), |
| 96 "window.domAutomationController.send(document.title)", | 96 "window.domAutomationController.send(document.title)", |
| 97 &result)); | 97 &result)); |
| 98 EXPECT_EQ(result, "Not Loaded"); | 98 EXPECT_EQ(result, "Not Loaded"); |
| 99 } | 99 } |
| OLD | NEW |