| Index: third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
|
| index cbfdd8c37ef92889f6fd98664bc0dbf94c6fd1b0..62d9c84c0d8c7f4a56924a292cd3e64a61451c27 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
|
| @@ -18,7 +18,6 @@
|
| #include "platform/heap/Handle.h"
|
| #include "platform/testing/UnitTestHelpers.h"
|
| #include "public/platform/Platform.h"
|
| -#include "public/platform/WebScheduler.h"
|
|
|
| #include <gtest/gtest.h>
|
| #include <v8.h>
|
| @@ -65,8 +64,7 @@
|
| class ScriptStreamingTest : public ::testing::Test {
|
| public:
|
| ScriptStreamingTest()
|
| - : m_loadingTaskRunner(Platform::current()->currentThread()->scheduler()->loadingTaskRunner())
|
| - , m_scope(v8::Isolate::GetCurrent())
|
| + : m_scope(v8::Isolate::GetCurrent())
|
| , m_settings(Settings::create())
|
| , m_resourceRequest("http://www.streaming-test.com/")
|
| , m_resource(new ScriptResource(m_resourceRequest, "UTF-8"))
|
| @@ -118,7 +116,6 @@
|
| testing::runPendingTasks();
|
| }
|
|
|
| - WebTaskRunner* m_loadingTaskRunner; // NOT OWNED
|
| V8TestingScope m_scope;
|
| OwnPtr<Settings> m_settings;
|
| // The Resource and PendingScript where we stream from. These don't really
|
| @@ -145,7 +142,7 @@
|
| TEST_F(ScriptStreamingTest, CompilingStreamedScript)
|
| {
|
| // Test that we can successfully compile a streamed script.
|
| - ScriptStreamer::startStreaming(pendingScript(), PendingScript::ParsingBlocking, m_settings.get(), m_scope.scriptState(), m_loadingTaskRunner);
|
| + ScriptStreamer::startStreaming(pendingScript(), PendingScript::ParsingBlocking, m_settings.get(), m_scope.scriptState());
|
| TestScriptResourceClient client;
|
| pendingScript().watchForLoad(&client);
|
|
|
| @@ -176,7 +173,7 @@
|
| // Test that scripts with parse errors are handled properly. In those cases,
|
| // the V8 side typically finished before loading finishes: make sure we
|
| // handle it gracefully.
|
| - ScriptStreamer::startStreaming(pendingScript(), PendingScript::ParsingBlocking, m_settings.get(), m_scope.scriptState(), m_loadingTaskRunner);
|
| + ScriptStreamer::startStreaming(pendingScript(), PendingScript::ParsingBlocking, m_settings.get(), m_scope.scriptState());
|
| TestScriptResourceClient client;
|
| pendingScript().watchForLoad(&client);
|
| appendData("function foo() {");
|
| @@ -208,7 +205,7 @@
|
| {
|
| // Test that the upper layers (PendingScript and up) can be ramped down
|
| // while streaming is ongoing, and ScriptStreamer handles it gracefully.
|
| - ScriptStreamer::startStreaming(pendingScript(), PendingScript::ParsingBlocking, m_settings.get(), m_scope.scriptState(), m_loadingTaskRunner);
|
| + ScriptStreamer::startStreaming(pendingScript(), PendingScript::ParsingBlocking, m_settings.get(), m_scope.scriptState());
|
| TestScriptResourceClient client;
|
| pendingScript().watchForLoad(&client);
|
| appendData("function foo() {");
|
| @@ -237,7 +234,7 @@
|
| // is suppressed (V8 doesn't parse while the script is loading), and the
|
| // upper layer (ScriptResourceClient) should get a notification when the
|
| // script is loaded.
|
| - ScriptStreamer::startStreaming(pendingScript(), PendingScript::ParsingBlocking, m_settings.get(), m_scope.scriptState(), m_loadingTaskRunner);
|
| + ScriptStreamer::startStreaming(pendingScript(), PendingScript::ParsingBlocking, m_settings.get(), m_scope.scriptState());
|
| TestScriptResourceClient client;
|
| pendingScript().watchForLoad(&client);
|
| appendData("function foo() {");
|
| @@ -266,7 +263,7 @@
|
| // Empty scripts should also be streamed properly, that is, the upper layer
|
| // (ScriptResourceClient) should be notified when an empty script has been
|
| // loaded.
|
| - ScriptStreamer::startStreaming(pendingScript(), PendingScript::ParsingBlocking, m_settings.get(), m_scope.scriptState(), m_loadingTaskRunner);
|
| + ScriptStreamer::startStreaming(pendingScript(), PendingScript::ParsingBlocking, m_settings.get(), m_scope.scriptState());
|
| TestScriptResourceClient client;
|
| pendingScript().watchForLoad(&client);
|
|
|
| @@ -287,7 +284,7 @@
|
| // Small scripts shouldn't be streamed.
|
| ScriptStreamer::setSmallScriptThresholdForTesting(100);
|
|
|
| - ScriptStreamer::startStreaming(pendingScript(), PendingScript::ParsingBlocking, m_settings.get(), m_scope.scriptState(), m_loadingTaskRunner);
|
| + ScriptStreamer::startStreaming(pendingScript(), PendingScript::ParsingBlocking, m_settings.get(), m_scope.scriptState());
|
| TestScriptResourceClient client;
|
| pendingScript().watchForLoad(&client);
|
|
|
| @@ -311,7 +308,7 @@
|
| // chunk is small.
|
| ScriptStreamer::setSmallScriptThresholdForTesting(100);
|
|
|
| - ScriptStreamer::startStreaming(pendingScript(), PendingScript::ParsingBlocking, m_settings.get(), m_scope.scriptState(), m_loadingTaskRunner);
|
| + ScriptStreamer::startStreaming(pendingScript(), PendingScript::ParsingBlocking, m_settings.get(), m_scope.scriptState());
|
| TestScriptResourceClient client;
|
| pendingScript().watchForLoad(&client);
|
|
|
| @@ -341,7 +338,7 @@
|
| // loading it.
|
| m_resource->setEncoding("windows-1252");
|
|
|
| - ScriptStreamer::startStreaming(pendingScript(), PendingScript::ParsingBlocking, m_settings.get(), m_scope.scriptState(), m_loadingTaskRunner);
|
| + ScriptStreamer::startStreaming(pendingScript(), PendingScript::ParsingBlocking, m_settings.get(), m_scope.scriptState());
|
| TestScriptResourceClient client;
|
| pendingScript().watchForLoad(&client);
|
|
|
| @@ -370,7 +367,7 @@
|
| // will also affect encoding detection.
|
| m_resource->setEncoding("windows-1252"); // This encoding is wrong on purpose.
|
|
|
| - ScriptStreamer::startStreaming(pendingScript(), PendingScript::ParsingBlocking, m_settings.get(), m_scope.scriptState(), m_loadingTaskRunner);
|
| + ScriptStreamer::startStreaming(pendingScript(), PendingScript::ParsingBlocking, m_settings.get(), m_scope.scriptState());
|
| TestScriptResourceClient client;
|
| pendingScript().watchForLoad(&client);
|
|
|
|
|