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

Side by Side Diff: chrome/browser/pdf/pdf_extension_test.cc

Issue 2405093003: [WIP] Mojo native bindings interface.
Patch Set: fixes webui tests Created 3 years, 9 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/webui/web_ui_mojo_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/webui/web_ui_mojo_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698