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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/files/file_enumerator.h" | 10 #include "base/files/file_enumerator.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include "content/public/browser/download_item.h" | 40 #include "content/public/browser/download_item.h" |
41 #include "content/public/browser/download_manager.h" | 41 #include "content/public/browser/download_manager.h" |
42 #include "content/public/browser/notification_observer.h" | 42 #include "content/public/browser/notification_observer.h" |
43 #include "content/public/browser/notification_registrar.h" | 43 #include "content/public/browser/notification_registrar.h" |
44 #include "content/public/browser/notification_service.h" | 44 #include "content/public/browser/notification_service.h" |
45 #include "content/public/browser/plugin_service.h" | 45 #include "content/public/browser/plugin_service.h" |
46 #include "content/public/browser/render_process_host.h" | 46 #include "content/public/browser/render_process_host.h" |
47 #include "content/public/browser/render_view_host.h" | 47 #include "content/public/browser/render_view_host.h" |
48 #include "content/public/browser/render_widget_host.h" | 48 #include "content/public/browser/render_widget_host.h" |
49 #include "content/public/browser/web_contents.h" | 49 #include "content/public/browser/web_contents.h" |
| 50 #include "content/public/common/content_switches.h" |
50 #include "content/public/test/browser_test_utils.h" | 51 #include "content/public/test/browser_test_utils.h" |
51 #include "content/public/test/test_navigation_observer.h" | 52 #include "content/public/test/test_navigation_observer.h" |
52 #include "extensions/browser/extension_registry.h" | 53 #include "extensions/browser/extension_registry.h" |
53 #include "extensions/common/manifest_handlers/mime_types_handler.h" | 54 #include "extensions/common/manifest_handlers/mime_types_handler.h" |
54 #include "extensions/test/result_catcher.h" | 55 #include "extensions/test/result_catcher.h" |
55 #include "net/dns/mock_host_resolver.h" | 56 #include "net/dns/mock_host_resolver.h" |
56 #include "net/test/embedded_test_server/embedded_test_server.h" | 57 #include "net/test/embedded_test_server/embedded_test_server.h" |
57 #include "ui/base/resource/resource_bundle.h" | 58 #include "ui/base/resource/resource_bundle.h" |
58 #include "url/gurl.h" | 59 #include "url/gurl.h" |
59 | 60 |
(...skipping 25 matching lines...) Expand all Loading... |
85 return false; | 86 return false; |
86 } | 87 } |
87 | 88 |
88 class PDFExtensionTest : public ExtensionApiTest, | 89 class PDFExtensionTest : public ExtensionApiTest, |
89 public testing::WithParamInterface<int> { | 90 public testing::WithParamInterface<int> { |
90 public: | 91 public: |
91 ~PDFExtensionTest() override {} | 92 ~PDFExtensionTest() override {} |
92 | 93 |
93 void SetUpCommandLine(base::CommandLine* command_line) override { | 94 void SetUpCommandLine(base::CommandLine* command_line) override { |
94 content::IsolateAllSitesForTesting(command_line); | 95 content::IsolateAllSitesForTesting(command_line); |
| 96 command_line->AppendSwitchASCII(switches::kEnableBlinkFeatures, "MojoJS"); |
95 } | 97 } |
96 | 98 |
97 void SetUpOnMainThread() override { | 99 void SetUpOnMainThread() override { |
98 ExtensionApiTest::SetUpOnMainThread(); | 100 ExtensionApiTest::SetUpOnMainThread(); |
99 host_resolver()->AddRule("*", "127.0.0.1"); | 101 host_resolver()->AddRule("*", "127.0.0.1"); |
100 ASSERT_TRUE(embedded_test_server()->InitializeAndListen()); | 102 ASSERT_TRUE(embedded_test_server()->InitializeAndListen()); |
101 content::SetupCrossSiteRedirector(embedded_test_server()); | 103 content::SetupCrossSiteRedirector(embedded_test_server()); |
102 embedded_test_server()->StartAcceptingConnections(); | 104 embedded_test_server()->StartAcceptingConnections(); |
103 } | 105 } |
104 | 106 |
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1020 ASSERT_EQ(web_contents, active_web_contents); | 1022 ASSERT_EQ(web_contents, active_web_contents); |
1021 | 1023 |
1022 content::WebContents* new_web_contents = | 1024 content::WebContents* new_web_contents = |
1023 browser()->tab_strip_model()->GetWebContentsAt(1); | 1025 browser()->tab_strip_model()->GetWebContentsAt(1); |
1024 ASSERT_TRUE(new_web_contents); | 1026 ASSERT_TRUE(new_web_contents); |
1025 ASSERT_NE(web_contents, new_web_contents); | 1027 ASSERT_NE(web_contents, new_web_contents); |
1026 | 1028 |
1027 const GURL& url = new_web_contents->GetURL(); | 1029 const GURL& url = new_web_contents->GetURL(); |
1028 ASSERT_EQ(GURL("http://www.example.com"), url); | 1030 ASSERT_EQ(GURL("http://www.example.com"), url); |
1029 } | 1031 } |
OLD | NEW |