OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 : m_didComplete(false), m_boolValue(false), m_context(context) {} | 378 : m_didComplete(false), m_boolValue(false), m_context(context) {} |
379 ~ScriptExecutionCallbackHelper() {} | 379 ~ScriptExecutionCallbackHelper() {} |
380 | 380 |
381 bool didComplete() const { return m_didComplete; } | 381 bool didComplete() const { return m_didComplete; } |
382 const String& stringValue() const { return m_stringValue; } | 382 const String& stringValue() const { return m_stringValue; } |
383 bool boolValue() { return m_boolValue; } | 383 bool boolValue() { return m_boolValue; } |
384 | 384 |
385 private: | 385 private: |
386 void completed(const WebVector<v8::Local<v8::Value>>& values) override { | 386 void completed(const WebVector<v8::Local<v8::Value>>& values) override { |
387 m_didComplete = true; | 387 m_didComplete = true; |
388 if (!values.isEmpty()) { | 388 if (!values.empty()) { |
389 if (values[0]->IsString()) { | 389 if (values[0]->IsString()) { |
390 m_stringValue = | 390 m_stringValue = |
391 toCoreString(values[0]->ToString(m_context).ToLocalChecked()); | 391 toCoreString(values[0]->ToString(m_context).ToLocalChecked()); |
392 } else if (values[0]->IsBoolean()) { | 392 } else if (values[0]->IsBoolean()) { |
393 m_boolValue = values[0].As<v8::Boolean>()->Value(); | 393 m_boolValue = values[0].As<v8::Boolean>()->Value(); |
394 } | 394 } |
395 } | 395 } |
396 } | 396 } |
397 | 397 |
398 bool m_didComplete; | 398 bool m_didComplete; |
(...skipping 11199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11598 FrameTestHelpers::loadFrame(localFrame, "data:text/html,some page"); | 11598 FrameTestHelpers::loadFrame(localFrame, "data:text/html,some page"); |
11599 | 11599 |
11600 // Local frame with remote parent should have transparent baseBackgroundColor. | 11600 // Local frame with remote parent should have transparent baseBackgroundColor. |
11601 Color color = localFrame->frameView()->baseBackgroundColor(); | 11601 Color color = localFrame->frameView()->baseBackgroundColor(); |
11602 EXPECT_EQ(Color::transparent, color); | 11602 EXPECT_EQ(Color::transparent, color); |
11603 | 11603 |
11604 view->close(); | 11604 view->close(); |
11605 } | 11605 } |
11606 | 11606 |
11607 } // namespace blink | 11607 } // namespace blink |
OLD | NEW |