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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ReadableStreamOperationsTest.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "bindings/core/v8/ReadableStreamOperations.h" 5 #include "bindings/core/v8/ReadableStreamOperations.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "bindings/core/v8/ScriptFunction.h" 8 #include "bindings/core/v8/ScriptFunction.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "bindings/core/v8/ScriptValue.h" 10 #include "bindings/core/v8/ScriptValue.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 ScriptValue r = eval(s); 149 ScriptValue r = eval(s);
150 if (block.HasCaught()) { 150 if (block.HasCaught()) {
151 ADD_FAILURE() << toCoreString(block.Exception()->ToString(isolate()) ).utf8().data(); 151 ADD_FAILURE() << toCoreString(block.Exception()->ToString(isolate()) ).utf8().data();
152 block.ReThrow(); 152 block.ReThrow();
153 } 153 }
154 return r; 154 return r;
155 } 155 }
156 156
157 V8TestingScope m_scope; 157 V8TestingScope m_scope;
158 v8::TryCatch m_block; 158 v8::TryCatch m_block;
159 RefPtrWillBePersistent<Document> m_document; 159 Persistent<Document> m_document;
160 }; 160 };
161 161
162 TEST_F(ReadableStreamOperationsTest, IsReadableStream) 162 TEST_F(ReadableStreamOperationsTest, IsReadableStream)
163 { 163 {
164 EXPECT_FALSE(ReadableStreamOperations::isReadableStream(scriptState(), Scrip tValue(scriptState(), v8::Undefined(isolate())))); 164 EXPECT_FALSE(ReadableStreamOperations::isReadableStream(scriptState(), Scrip tValue(scriptState(), v8::Undefined(isolate()))));
165 EXPECT_FALSE(ReadableStreamOperations::isReadableStream(scriptState(), Scrip tValue::createNull(scriptState()))); 165 EXPECT_FALSE(ReadableStreamOperations::isReadableStream(scriptState(), Scrip tValue::createNull(scriptState())));
166 EXPECT_FALSE(ReadableStreamOperations::isReadableStream(scriptState(), Scrip tValue(scriptState(), v8::Object::New(isolate())))); 166 EXPECT_FALSE(ReadableStreamOperations::isReadableStream(scriptState(), Scrip tValue(scriptState(), v8::Object::New(isolate()))));
167 ScriptValue stream = evalWithPrintingError("new ReadableStream()"); 167 ScriptValue stream = evalWithPrintingError("new ReadableStream()");
168 EXPECT_FALSE(stream.isEmpty()); 168 EXPECT_FALSE(stream.isEmpty());
169 EXPECT_TRUE(ReadableStreamOperations::isReadableStream(scriptState(), stream )); 169 EXPECT_TRUE(ReadableStreamOperations::isReadableStream(scriptState(), stream ));
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 EXPECT_EQ("hello", it1->value()); 257 EXPECT_EQ("hello", it1->value());
258 EXPECT_TRUE(it2->isSet()); 258 EXPECT_TRUE(it2->isSet());
259 EXPECT_TRUE(it2->isValid()); 259 EXPECT_TRUE(it2->isValid());
260 EXPECT_TRUE(it2->isDone()); 260 EXPECT_TRUE(it2->isDone());
261 } 261 }
262 262
263 } // namespace 263 } // namespace
264 264
265 } // namespace blink 265 } // namespace blink
266 266
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698