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

Side by Side Diff: chrome/browser/extensions/extension_webrequest_apitest.cc

Issue 8511063: Improve merging of header modifications in webRequest.OnHeadersReceived (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/command_line.h" 5 #include "base/command_line.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/extensions/extension_webrequest_api.h" 8 #include "chrome/browser/extensions/extension_webrequest_api.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, WebRequestSimple) { 66 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, WebRequestSimple) {
67 CommandLine::ForCurrentProcess()->AppendSwitch( 67 CommandLine::ForCurrentProcess()->AppendSwitch(
68 switches::kEnableExperimentalExtensionApis); 68 switches::kEnableExperimentalExtensionApis);
69 69
70 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_simple.html")) << 70 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_simple.html")) <<
71 message_; 71 message_;
72 } 72 }
73 73
74 // Broken, http://crbug.com/101651 74 // Broken, http://crbug.com/101651
75 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, DISABLED_WebRequestComplex) { 75 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, /*DISABLED_*/WebRequestComple x) {
battre 2011/11/11 15:01:57 I will revert this before committing.
76 CommandLine::ForCurrentProcess()->AppendSwitch( 76 CommandLine::ForCurrentProcess()->AppendSwitch(
77 switches::kEnableExperimentalExtensionApis); 77 switches::kEnableExperimentalExtensionApis);
78 78
79 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_complex.html")) << 79 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_complex.html")) <<
80 message_; 80 message_;
81 } 81 }
82 82
83 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, WebRequestAuthRequired) { 83 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, WebRequestAuthRequired) {
84 CommandLine::ForCurrentProcess()->AppendSwitch( 84 CommandLine::ForCurrentProcess()->AppendSwitch(
85 switches::kEnableExperimentalExtensionApis); 85 switches::kEnableExperimentalExtensionApis);
86 86
87 CancelLoginDialog login_dialog_helper; 87 CancelLoginDialog login_dialog_helper;
88 88
89 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_auth_required.html")) << 89 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_auth_required.html")) <<
90 message_; 90 message_;
91 } 91 }
92 92
93 // Hangs flakily: http://crbug.com/91715 93 // Hangs flakily: http://crbug.com/91715
94 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, 94 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest,
95 DISABLED_WebRequestBlocking) { 95 /*DISABLED_*/WebRequestBlocking) {
96 CommandLine::ForCurrentProcess()->AppendSwitch( 96 CommandLine::ForCurrentProcess()->AppendSwitch(
97 switches::kEnableExperimentalExtensionApis); 97 switches::kEnableExperimentalExtensionApis);
98 98
99 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_blocking.html")) << 99 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_blocking.html")) <<
100 message_; 100 message_;
101 } 101 }
102 102
103 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, WebRequestNewTab) { 103 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, WebRequestNewTab) {
104 CommandLine::ForCurrentProcess()->AppendSwitch( 104 CommandLine::ForCurrentProcess()->AppendSwitch(
105 switches::kEnableExperimentalExtensionApis); 105 switches::kEnableExperimentalExtensionApis);
(...skipping 21 matching lines...) Expand all
127 mouse_event.button = WebKit::WebMouseEvent::ButtonLeft; 127 mouse_event.button = WebKit::WebMouseEvent::ButtonLeft;
128 mouse_event.x = 7; 128 mouse_event.x = 7;
129 mouse_event.y = 7; 129 mouse_event.y = 7;
130 mouse_event.clickCount = 1; 130 mouse_event.clickCount = 1;
131 tab->render_view_host()->ForwardMouseEvent(mouse_event); 131 tab->render_view_host()->ForwardMouseEvent(mouse_event);
132 mouse_event.type = WebKit::WebInputEvent::MouseUp; 132 mouse_event.type = WebKit::WebInputEvent::MouseUp;
133 tab->render_view_host()->ForwardMouseEvent(mouse_event); 133 tab->render_view_host()->ForwardMouseEvent(mouse_event);
134 134
135 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); 135 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message();
136 } 136 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698