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

Side by Side Diff: chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc

Issue 10661038: Revert 143896 - Filtered events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
OLDNEW
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 "chrome/app/chrome_command_ids.h" 5 #include "chrome/app/chrome_command_ids.h"
6 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" 6 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h"
7 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/tab_contents/render_view_context_menu.h" 10 #include "chrome/browser/tab_contents/render_view_context_menu.h"
(...skipping 14 matching lines...) Expand all
25 // http://crbug.com/118478 25 // http://crbug.com/118478
26 #define MAYBE_WebNavigationIFrame DISABLED_WebNavigationIFrame 26 #define MAYBE_WebNavigationIFrame DISABLED_WebNavigationIFrame
27 #define MAYBE_WebNavigationFailures DISABLED_WebNavigationFailures 27 #define MAYBE_WebNavigationFailures DISABLED_WebNavigationFailures
28 #define MAYBE_WebNavigationForwardBack DISABLED_WebNavigationForwardBack 28 #define MAYBE_WebNavigationForwardBack DISABLED_WebNavigationForwardBack
29 #define MAYBE_WebNavigationClientRedirect DISABLED_WebNavigationClientRedirect 29 #define MAYBE_WebNavigationClientRedirect DISABLED_WebNavigationClientRedirect
30 #define MAYBE_WebNavigationGetFrame DISABLED_WebNavigationGetFrame 30 #define MAYBE_WebNavigationGetFrame DISABLED_WebNavigationGetFrame
31 #define MAYBE_WebNavigationSimpleLoad DISABLED_WebNavigationSimpleLoad 31 #define MAYBE_WebNavigationSimpleLoad DISABLED_WebNavigationSimpleLoad
32 #define MAYBE_WebNavigationReferenceFragment \ 32 #define MAYBE_WebNavigationReferenceFragment \
33 DISABLED_WebNavigationReferenceFragment 33 DISABLED_WebNavigationReferenceFragment
34 #define MAYBE_WebNavigationOpenTab DISABLED_WebNavigationOpenTab 34 #define MAYBE_WebNavigationOpenTab DISABLED_WebNavigationOpenTab
35 #define MAYBE_WebNavigationFilteredTest DISABLED_WebNavigationFilteredTest
36 #else 35 #else
37 #define MAYBE_WebNavigationIFrame WebNavigationIFrame 36 #define MAYBE_WebNavigationIFrame WebNavigationIFrame
38 #define MAYBE_WebNavigationFailures WebNavigationFailures 37 #define MAYBE_WebNavigationFailures WebNavigationFailures
39 #define MAYBE_WebNavigationForwardBack WebNavigationForwardBack 38 #define MAYBE_WebNavigationForwardBack WebNavigationForwardBack
40 #define MAYBE_WebNavigationClientRedirect WebNavigationClientRedirect 39 #define MAYBE_WebNavigationClientRedirect WebNavigationClientRedirect
41 #define MAYBE_WebNavigationGetFrame WebNavigationGetFrame 40 #define MAYBE_WebNavigationGetFrame WebNavigationGetFrame
42 #define MAYBE_WebNavigationSimpleLoad WebNavigationSimpleLoad 41 #define MAYBE_WebNavigationSimpleLoad WebNavigationSimpleLoad
43 #define MAYBE_WebNavigationReferenceFragment WebNavigationReferenceFragment 42 #define MAYBE_WebNavigationReferenceFragment WebNavigationReferenceFragment
44 #define MAYBE_WebNavigationOpenTab WebNavigationOpenTab 43 #define MAYBE_WebNavigationOpenTab WebNavigationOpenTab
45 #define MAYBE_WebNavigationFilteredTest WebNavigationFilteredTest
46 #endif 44 #endif
47 45
48 namespace extensions { 46 namespace extensions {
49 47
50 namespace { 48 namespace {
51 49
52 class TestRenderViewContextMenu : public RenderViewContextMenu { 50 class TestRenderViewContextMenu : public RenderViewContextMenu {
53 public: 51 public:
54 TestRenderViewContextMenu(WebContents* web_contents, 52 TestRenderViewContextMenu(WebContents* web_contents,
55 const content::ContextMenuParams& params) 53 const content::ContextMenuParams& params)
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_WebNavigationFailures) { 166 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_WebNavigationFailures) {
169 FrameNavigationState::set_allow_extension_scheme(true); 167 FrameNavigationState::set_allow_extension_scheme(true);
170 168
171 CommandLine::ForCurrentProcess()->AppendSwitch( 169 CommandLine::ForCurrentProcess()->AppendSwitch(
172 switches::kAllowLegacyExtensionManifests); 170 switches::kAllowLegacyExtensionManifests);
173 171
174 ASSERT_TRUE( 172 ASSERT_TRUE(
175 RunExtensionSubtest("webnavigation", "test_failures.html")) << message_; 173 RunExtensionSubtest("webnavigation", "test_failures.html")) << message_;
176 } 174 }
177 175
178 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_WebNavigationFilteredTest) {
179 FrameNavigationState::set_allow_extension_scheme(true);
180
181 CommandLine::ForCurrentProcess()->AppendSwitch(
182 switches::kAllowLegacyExtensionManifests);
183
184 ASSERT_TRUE(
185 RunExtensionSubtest("webnavigation", "test_filtered.html")) << message_;
186 }
187
188 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WebNavigationUserAction) { 176 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WebNavigationUserAction) {
189 FrameNavigationState::set_allow_extension_scheme(true); 177 FrameNavigationState::set_allow_extension_scheme(true);
190 178
191 CommandLine::ForCurrentProcess()->AppendSwitch( 179 CommandLine::ForCurrentProcess()->AppendSwitch(
192 switches::kAllowLegacyExtensionManifests); 180 switches::kAllowLegacyExtensionManifests);
193 181
194 // Wait for the extension to set itself up and return control to us. 182 // Wait for the extension to set itself up and return control to us.
195 ASSERT_TRUE( 183 ASSERT_TRUE(
196 RunExtensionSubtest("webnavigation", "test_userAction.html")) << message_; 184 RunExtensionSubtest("webnavigation", "test_userAction.html")) << message_;
197 185
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 mouse_event.y = 7; 315 mouse_event.y = 7;
328 mouse_event.clickCount = 1; 316 mouse_event.clickCount = 1;
329 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); 317 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event);
330 mouse_event.type = WebKit::WebInputEvent::MouseUp; 318 mouse_event.type = WebKit::WebInputEvent::MouseUp;
331 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); 319 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event);
332 320
333 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); 321 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message();
334 } 322 }
335 323
336 } // namespace extensions 324 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698