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 "content/test/plugin/plugin_get_javascript_url2_test.h" | 5 #include "content/test/plugin/plugin_get_javascript_url2_test.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 | 8 |
9 // url for "self". | 9 // url for "self". |
10 #define SELF_URL "javascript:window.location+\"\"" | 10 #define SELF_URL "javascript:window.location+\"\"" |
11 // The identifier for the self url stream. | 11 // The identifier for the self url stream. |
12 #define SELF_URL_STREAM_ID 1 | 12 #define SELF_URL_STREAM_ID 1 |
13 | 13 |
14 // The identifier for the fetched url stream. | |
15 #define FETCHED_URL_STREAM_ID 2 | |
16 | |
17 // The maximum chunk size of stream data. | 14 // The maximum chunk size of stream data. |
18 #define STREAM_CHUNK 197 | 15 #define STREAM_CHUNK 197 |
19 | 16 |
20 const int kNPNEvaluateTimerID = 100; | |
21 const int kNPNEvaluateTimerElapse = 50; | |
22 | |
23 namespace NPAPIClient { | 17 namespace NPAPIClient { |
24 | 18 |
25 ExecuteGetJavascriptUrl2Test::ExecuteGetJavascriptUrl2Test( | 19 ExecuteGetJavascriptUrl2Test::ExecuteGetJavascriptUrl2Test( |
26 NPP id, NPNetscapeFuncs *host_functions) | 20 NPP id, NPNetscapeFuncs *host_functions) |
27 : PluginTest(id, host_functions), | 21 : PluginTest(id, host_functions), |
28 test_started_(false) { | 22 test_started_(false) { |
29 } | 23 } |
30 | 24 |
31 NPError ExecuteGetJavascriptUrl2Test::SetWindow(NPWindow* pNPWindow) { | 25 NPError ExecuteGetJavascriptUrl2Test::SetWindow(NPWindow* pNPWindow) { |
32 #if !defined(OS_MACOSX) | 26 #if !defined(OS_MACOSX) |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 SetError("Failed to obtain window location."); | 121 SetError("Failed to obtain window location."); |
128 SignalTestCompleted(); | 122 SignalTestCompleted(); |
129 break; | 123 break; |
130 default: | 124 default: |
131 SetError("Unexpected NewStream callback"); | 125 SetError("Unexpected NewStream callback"); |
132 break; | 126 break; |
133 } | 127 } |
134 } | 128 } |
135 | 129 |
136 } // namespace NPAPIClient | 130 } // namespace NPAPIClient |
OLD | NEW |