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

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

Issue 605593002: PPAPI: Support sending browser-hosted resources synchronously Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix content_browsertests Created 6 years, 1 month 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 | « content/renderer/pepper/v8_var_converter.cc ('k') | ppapi/proxy/ppapi_messages.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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 50
51 class MockResourceConverter : public content::ResourceConverter { 51 class MockResourceConverter : public content::ResourceConverter {
52 public: 52 public:
53 ~MockResourceConverter() override {} 53 ~MockResourceConverter() override {}
54 void Reset() override {} 54 void Reset() override {}
55 bool NeedsFlush() override { return false; } 55 bool NeedsFlush() override { return false; }
56 void Flush(const base::Callback<void(bool)>& callback) override { 56 void Flush(const base::Callback<void(bool)>& callback) override {
57 NOTREACHED(); 57 NOTREACHED();
58 } 58 }
59 void FlushSync() override { NOTREACHED(); }
59 bool FromV8Value(v8::Handle<v8::Object> val, 60 bool FromV8Value(v8::Handle<v8::Object> val,
60 v8::Handle<v8::Context> context, 61 v8::Handle<v8::Context> context,
61 PP_Var* result, 62 PP_Var* result,
62 bool* was_resource) override { 63 bool* was_resource) override {
63 *was_resource = false; 64 *was_resource = false;
64 return true; 65 return true;
65 } 66 }
66 bool ToV8Value(const PP_Var& var, 67 bool ToV8Value(const PP_Var& var,
67 v8::Handle<v8::Context> context, 68 v8::Handle<v8::Context> context,
68 v8::Handle<v8::Value>* result) override { 69 v8::Handle<v8::Value>* result) override {
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 expected->SetWithStringKey("null", quux.get()); 436 expected->SetWithStringKey("null", quux.get());
436 ScopedPPVar oops(ScopedPPVar::PassRef(), StringVar::StringToPPVar("oops")); 437 ScopedPPVar oops(ScopedPPVar::PassRef(), StringVar::StringToPPVar("oops"));
437 expected->SetWithStringKey("undefined", oops.get()); 438 expected->SetWithStringKey("undefined", oops.get());
438 ScopedPPVar release_expected(ScopedPPVar::PassRef(), expected->GetPPVar()); 439 ScopedPPVar release_expected(ScopedPPVar::PassRef(), expected->GetPPVar());
439 440
440 ASSERT_TRUE(TestEqual(release_expected.get(), release_actual.get(), true)); 441 ASSERT_TRUE(TestEqual(release_expected.get(), release_actual.get(), true));
441 } 442 }
442 } 443 }
443 444
444 } // namespace content 445 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/v8_var_converter.cc ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698