OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser/geolocation/access_token_store.h" | 5 #include "chrome/browser/geolocation/access_token_store.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/chrome_thread.h" | 9 #include "chrome/browser/chrome_thread.h" |
9 #include "chrome/test/in_process_browser_test.h" | 10 #include "chrome/test/in_process_browser_test.h" |
10 #include "chrome/test/ui_test_utils.h" | 11 #include "chrome/test/ui_test_utils.h" |
11 | 12 |
12 namespace { | 13 namespace { |
13 // The token store factory implementation expects to be used from any well-known | 14 // The token store factory implementation expects to be used from any well-known |
14 // chrome thread other than UI. We could use any arbitrary thread; IO is | 15 // chrome thread other than UI. We could use any arbitrary thread; IO is |
15 // a good choice as this is the expected usage. | 16 // a good choice as this is the expected usage. |
16 const ChromeThread::ID kExpectedClientThreadId = ChromeThread::IO; | 17 const ChromeThread::ID kExpectedClientThreadId = ChromeThread::IO; |
17 const char* kRefServerUrl1 = "https://test.domain.example/foo?id=bar.bar"; | 18 const char* kRefServerUrl1 = "https://test.domain.example/foo?id=bar.bar"; |
(...skipping 123 matching lines...) Loading... |
141 DoTestStepAndWaitForResults(kRefServerUrl2, &ref_token2, NULL); | 142 DoTestStepAndWaitForResults(kRefServerUrl2, &ref_token2, NULL); |
142 DoTestStepAndWaitForResults(kRefServerUrl1, &ref_token1, NULL); | 143 DoTestStepAndWaitForResults(kRefServerUrl1, &ref_token1, NULL); |
143 } | 144 } |
144 | 145 |
145 IN_PROC_BROWSER_TEST_F(GeolocationAccessTokenStoreTest, CancelRequest) { | 146 IN_PROC_BROWSER_TEST_F(GeolocationAccessTokenStoreTest, CancelRequest) { |
146 ChromeThread::PostTask( | 147 ChromeThread::PostTask( |
147 kExpectedClientThreadId, FROM_HERE, NewRunnableFunction( | 148 kExpectedClientThreadId, FROM_HERE, NewRunnableFunction( |
148 RunCancelTestInClientTread)); | 149 RunCancelTestInClientTread)); |
149 ui_test_utils::RunMessageLoop(); | 150 ui_test_utils::RunMessageLoop(); |
150 } | 151 } |
OLD | NEW |