OLD | NEW |
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 "content/test/plugin/plugin_get_javascript_url_test.h" | 5 #include "content/test/plugin/plugin_get_javascript_url_test.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 | 9 |
10 // url for "self". | 10 // url for "self". |
11 #define SELF_URL "javascript:window.location+\"\"" | 11 #define SELF_URL "javascript:window.location+\"\"" |
12 // The identifier for the self url stream. | 12 // The identifier for the self url stream. |
13 #define SELF_URL_STREAM_ID 1 | 13 #define SELF_URL_STREAM_ID 1 |
14 | 14 |
15 // The identifier for the fetched url stream. | |
16 #define FETCHED_URL_STREAM_ID 2 | |
17 | |
18 // The maximum chunk size of stream data. | 15 // The maximum chunk size of stream data. |
19 #define STREAM_CHUNK 197 | 16 #define STREAM_CHUNK 197 |
20 | 17 |
| 18 #if defined(OS_WIN) |
21 const int kNPNEvaluateTimerID = 100; | 19 const int kNPNEvaluateTimerID = 100; |
22 const int kNPNEvaluateTimerElapse = 50; | 20 const int kNPNEvaluateTimerElapse = 50; |
23 | 21 #endif |
24 | 22 |
25 namespace NPAPIClient { | 23 namespace NPAPIClient { |
26 | 24 |
27 ExecuteGetJavascriptUrlTest::ExecuteGetJavascriptUrlTest( | 25 ExecuteGetJavascriptUrlTest::ExecuteGetJavascriptUrlTest( |
28 NPP id, NPNetscapeFuncs *host_functions) | 26 NPP id, NPNetscapeFuncs *host_functions) |
29 : PluginTest(id, host_functions), | 27 : PluginTest(id, host_functions), |
30 test_started_(false), | 28 test_started_(false), |
31 #if defined(OS_WIN) | 29 #if defined(OS_WIN) |
32 window_(NULL), | 30 window_(NULL), |
33 #endif | 31 #endif |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 SetError("Failed to obtain window location."); | 211 SetError("Failed to obtain window location."); |
214 SignalTestCompleted(); | 212 SignalTestCompleted(); |
215 break; | 213 break; |
216 default: | 214 default: |
217 SetError("Unexpected NewStream callback"); | 215 SetError("Unexpected NewStream callback"); |
218 break; | 216 break; |
219 } | 217 } |
220 } | 218 } |
221 | 219 |
222 } // namespace NPAPIClient | 220 } // namespace NPAPIClient |
OLD | NEW |