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" |
11 #include "content/test/test_browser_thread.h" | 11 #include "content/public/test/test_browser_thread.h" |
12 #include "content/test/web_contents_tester.h" | 12 #include "content/test/web_contents_tester.h" |
13 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 using content::BrowserContext; | 16 using content::BrowserContext; |
17 using content::BrowserThread; | 17 using content::BrowserThread; |
18 using content::TestBrowserThread; | 18 using content::TestBrowserThread; |
19 using content::WebContents; | 19 using content::WebContents; |
20 using content::WebContentsDelegate; | 20 using content::WebContentsDelegate; |
21 using content::WebContentsTester; | 21 using content::WebContentsTester; |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 // http scheme is not allowed. | 204 // http scheme is not allowed. |
205 EXPECT_FALSE(CallIsValidRedirectUrl( | 205 EXPECT_FALSE(CallIsValidRedirectUrl( |
206 GURL("http://abcdefghij.chromiumapp.org/callback"))); | 206 GURL("http://abcdefghij.chromiumapp.org/callback"))); |
207 EXPECT_FALSE(CallIsValidRedirectUrl( | 207 EXPECT_FALSE(CallIsValidRedirectUrl( |
208 GURL("https://abcd.chromiumapp.org/callback"))); | 208 GURL("https://abcd.chromiumapp.org/callback"))); |
209 EXPECT_FALSE(CallIsValidRedirectUrl( | 209 EXPECT_FALSE(CallIsValidRedirectUrl( |
210 GURL("chrome-extension://abcd/callback"))); | 210 GURL("chrome-extension://abcd/callback"))); |
211 EXPECT_FALSE(CallIsValidRedirectUrl( | 211 EXPECT_FALSE(CallIsValidRedirectUrl( |
212 GURL("chrome-extension://abcdefghijkl/"))); | 212 GURL("chrome-extension://abcdefghijkl/"))); |
213 } | 213 } |
OLD | NEW |