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

Side by Side Diff: content/renderer/pepper/v8_var_converter_unittest.cc

Issue 1174543002: ppapi: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix V8VarConverterTest. Created 5 years, 6 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
« no previous file with comments | « no previous file | ppapi/host/resource_message_filter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer/pepper/v8_var_converter.h" 5 #include "content/renderer/pepper/v8_var_converter.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 227 }
228 228
229 v8::Isolate* isolate_; 229 v8::Isolate* isolate_;
230 230
231 // Context for the JavaScript in the test. 231 // Context for the JavaScript in the test.
232 v8::Persistent<v8::Context> context_; 232 v8::Persistent<v8::Context> context_;
233 233
234 scoped_ptr<V8VarConverter> converter_; 234 scoped_ptr<V8VarConverter> converter_;
235 235
236 private: 236 private:
237 base::MessageLoop message_loop_; // Required to receive callbacks.
238
237 TestGlobals globals_; 239 TestGlobals globals_;
238
239 base::MessageLoop message_loop_;
240 }; 240 };
241 241
242 } // namespace 242 } // namespace
243 243
244 TEST_F(V8VarConverterTest, SimpleRoundTripTest) { 244 TEST_F(V8VarConverterTest, SimpleRoundTripTest) {
245 EXPECT_TRUE(RoundTripAndCompare(PP_MakeUndefined())); 245 EXPECT_TRUE(RoundTripAndCompare(PP_MakeUndefined()));
246 EXPECT_TRUE(RoundTripAndCompare(PP_MakeNull())); 246 EXPECT_TRUE(RoundTripAndCompare(PP_MakeNull()));
247 EXPECT_TRUE(RoundTripAndCompare(PP_MakeInt32(100))); 247 EXPECT_TRUE(RoundTripAndCompare(PP_MakeInt32(100)));
248 EXPECT_TRUE(RoundTripAndCompare(PP_MakeBool(PP_TRUE))); 248 EXPECT_TRUE(RoundTripAndCompare(PP_MakeBool(PP_TRUE)));
249 EXPECT_TRUE(RoundTripAndCompare(PP_MakeDouble(53.75))); 249 EXPECT_TRUE(RoundTripAndCompare(PP_MakeDouble(53.75)));
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 expected->SetWithStringKey("null", quux.get()); 437 expected->SetWithStringKey("null", quux.get());
438 ScopedPPVar oops(ScopedPPVar::PassRef(), StringVar::StringToPPVar("oops")); 438 ScopedPPVar oops(ScopedPPVar::PassRef(), StringVar::StringToPPVar("oops"));
439 expected->SetWithStringKey("undefined", oops.get()); 439 expected->SetWithStringKey("undefined", oops.get());
440 ScopedPPVar release_expected(ScopedPPVar::PassRef(), expected->GetPPVar()); 440 ScopedPPVar release_expected(ScopedPPVar::PassRef(), expected->GetPPVar());
441 441
442 ASSERT_TRUE(TestEqual(release_expected.get(), release_actual.get(), true)); 442 ASSERT_TRUE(TestEqual(release_expected.get(), release_actual.get(), true));
443 } 443 }
444 } 444 }
445 445
446 } // namespace content 446 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ppapi/host/resource_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698