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 4456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4467 Vector<std::unique_ptr<Notification>>& release_notifications_; | 4467 Vector<std::unique_ptr<Notification>>& release_notifications_; |
4468 | 4468 |
4469 void DidCreateScriptContext(WebLocalFrame* frame, | 4469 void DidCreateScriptContext(WebLocalFrame* frame, |
4470 v8::Local<v8::Context> context, | 4470 v8::Local<v8::Context> context, |
4471 int world_id) override { | 4471 int world_id) override { |
4472 ASSERT_EQ(Frame(), frame); | 4472 ASSERT_EQ(Frame(), frame); |
4473 create_notifications_.push_back( | 4473 create_notifications_.push_back( |
4474 WTF::MakeUnique<Notification>(frame, context, world_id)); | 4474 WTF::MakeUnique<Notification>(frame, context, world_id)); |
4475 } | 4475 } |
4476 | 4476 |
4477 void WillReleaseScriptContext(WebLocalFrame* frame, | 4477 void WillReleaseScriptContext(v8::Local<v8::Context> context, |
4478 v8::Local<v8::Context> context, | |
4479 int world_id) override { | 4478 int world_id) override { |
4480 ASSERT_EQ(Frame(), frame); | |
4481 release_notifications_.push_back( | 4479 release_notifications_.push_back( |
4482 WTF::MakeUnique<Notification>(frame, context, world_id)); | 4480 WTF::MakeUnique<Notification>(Frame(), context, world_id)); |
4483 } | 4481 } |
4484 }; | 4482 }; |
4485 | 4483 |
4486 class ContextLifetimeTestMainFrameClient | 4484 class ContextLifetimeTestMainFrameClient |
4487 : public ContextLifetimeTestWebFrameClient { | 4485 : public ContextLifetimeTestWebFrameClient { |
4488 public: | 4486 public: |
4489 ContextLifetimeTestMainFrameClient( | 4487 ContextLifetimeTestMainFrameClient( |
4490 Vector<std::unique_ptr<Notification>>& create_notifications, | 4488 Vector<std::unique_ptr<Notification>>& create_notifications, |
4491 Vector<std::unique_ptr<Notification>>& release_notifications) | 4489 Vector<std::unique_ptr<Notification>>& release_notifications) |
4492 : ContextLifetimeTestWebFrameClient(create_notifications, | 4490 : ContextLifetimeTestWebFrameClient(create_notifications, |
(...skipping 7554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12047 | 12045 |
12048 // Failing the original child frame navigation and trying to render fallback | 12046 // Failing the original child frame navigation and trying to render fallback |
12049 // content shouldn't crash. It should return NoLoadInProgress. This is so the | 12047 // content shouldn't crash. It should return NoLoadInProgress. This is so the |
12050 // caller won't attempt to replace the correctly empty frame with an error | 12048 // caller won't attempt to replace the correctly empty frame with an error |
12051 // page. | 12049 // page. |
12052 EXPECT_EQ(WebLocalFrame::NoLoadInProgress, | 12050 EXPECT_EQ(WebLocalFrame::NoLoadInProgress, |
12053 child->MaybeRenderFallbackContent(WebURLError())); | 12051 child->MaybeRenderFallbackContent(WebURLError())); |
12054 } | 12052 } |
12055 | 12053 |
12056 } // namespace blink | 12054 } // namespace blink |
OLD | NEW |