Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp

Issue 1402933002: Revert "Post loading tasks on the appropriate WebFrameScheduler's queue." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bad merge Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 @@ private:
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 @@ protected:
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 @@ private:
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_F(ScriptStreamingTest, CompilingStreamedScriptWithParseError)
// 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_F(ScriptStreamingTest, CancellingStreaming)
{
// 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 @@ TEST_F(ScriptStreamingTest, SuppressingStreaming)
// 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 @@ TEST_F(ScriptStreamingTest, EmptyScripts)
// 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 @@ TEST_F(ScriptStreamingTest, SmallScripts)
// 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 @@ TEST_F(ScriptStreamingTest, ScriptsWithSmallFirstChunk)
// 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 @@ TEST_F(ScriptStreamingTest, EncodingChanges)
// 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 @@ TEST_F(ScriptStreamingTest, EncodingFromBOM)
// 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);
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptStreamer.cpp ('k') | third_party/WebKit/Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698