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/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "chrome/browser/extensions/api/identity/web_auth_flow.h" | 6 #include "chrome/browser/extensions/api/identity/web_auth_flow.h" |
7 #include "chrome/browser/ui/extensions/web_auth_flow_window.h" | 7 #include "chrome/browser/ui/extensions/web_auth_flow_window.h" |
8 #include "chrome/test/base/chrome_render_view_host_test_harness.h" | 8 #include "chrome/test/base/chrome_render_view_host_test_harness.h" |
9 #include "chrome/test/base/testing_profile.h" | 9 #include "chrome/test/base/testing_profile.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
62 browser_context_, NULL); | 62 browser_context_, NULL); |
63 return web_contents_; | 63 return web_contents_; |
64 } | 64 } |
65 | 65 |
66 virtual WebAuthFlowWindow* CreateAuthWindow() OVERRIDE { | 66 virtual WebAuthFlowWindow* CreateAuthWindow() OVERRIDE { |
67 CHECK(!window_); | 67 CHECK(!window_); |
68 window_ = new MockWebAuthFlowWindow(); | 68 window_ = new MockWebAuthFlowWindow(); |
69 return window_; | 69 return window_; |
70 } | 70 } |
71 | 71 |
72 WebContents* contents() { | |
73 return web_contents_; | |
Roger Tawa OOO till Jul 10th
2012/06/01 13:56:42
Why is this change needed to fix the memory leak?
James Hawkins
2012/06/01 23:53:13
Didn't say it was. It's drive-by cleanup I saw wh
Roger Tawa OOO till Jul 10th
2012/06/04 14:50:40
OK, the CL description did not mention it included
| |
74 } | |
75 | |
76 WebContentsTester* contents_tester() { | 72 WebContentsTester* contents_tester() { |
77 return WebContentsTester::For(web_contents_); | 73 return WebContentsTester::For(web_contents_); |
78 } | 74 } |
79 | 75 |
80 MockWebAuthFlowWindow& window() { | 76 MockWebAuthFlowWindow& window() { |
81 return *window_; | 77 return *window_; |
82 } | 78 } |
83 | 79 |
84 bool HasWindow() const { | 80 bool HasWindow() const { |
85 return window_ != NULL; | 81 return window_ != NULL; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
208 // http scheme is not allowed. | 204 // http scheme is not allowed. |
209 EXPECT_FALSE(CallIsValidRedirectUrl( | 205 EXPECT_FALSE(CallIsValidRedirectUrl( |
210 GURL("http://abcdefghij.chromiumapp.org/callback"))); | 206 GURL("http://abcdefghij.chromiumapp.org/callback"))); |
211 EXPECT_FALSE(CallIsValidRedirectUrl( | 207 EXPECT_FALSE(CallIsValidRedirectUrl( |
212 GURL("https://abcd.chromiumapp.org/callback"))); | 208 GURL("https://abcd.chromiumapp.org/callback"))); |
213 EXPECT_FALSE(CallIsValidRedirectUrl( | 209 EXPECT_FALSE(CallIsValidRedirectUrl( |
214 GURL("chrome-extension://abcd/callback"))); | 210 GURL("chrome-extension://abcd/callback"))); |
215 EXPECT_FALSE(CallIsValidRedirectUrl( | 211 EXPECT_FALSE(CallIsValidRedirectUrl( |
216 GURL("chrome-extension://abcdefghijkl/"))); | 212 GURL("chrome-extension://abcdefghijkl/"))); |
217 } | 213 } |
OLD | NEW |