Route native close through platform services
This commit is contained in:
@@ -52,6 +52,11 @@ public:
|
||||
shared_path.assign(path);
|
||||
}
|
||||
|
||||
void request_app_close() override
|
||||
{
|
||||
++app_close_requests;
|
||||
}
|
||||
|
||||
void pick_image(pp::platform::PickedPathCallback callback) override
|
||||
{
|
||||
++pick_image_requests;
|
||||
@@ -95,6 +100,7 @@ public:
|
||||
int keyboard_updates = 0;
|
||||
int display_file_requests = 0;
|
||||
int share_file_requests = 0;
|
||||
int app_close_requests = 0;
|
||||
int pick_image_requests = 0;
|
||||
int pick_file_requests = 0;
|
||||
int pick_save_file_requests = 0;
|
||||
@@ -162,9 +168,11 @@ void platform_services_dispatch_file_actions(pp::tests::Harness& harness)
|
||||
|
||||
services.display_file("D:/Paint/export.png");
|
||||
services.share_file("D:/Paint/demo.ppi");
|
||||
services.request_app_close();
|
||||
|
||||
PP_EXPECT(harness, fake.display_file_requests == 1);
|
||||
PP_EXPECT(harness, fake.share_file_requests == 1);
|
||||
PP_EXPECT(harness, fake.app_close_requests == 1);
|
||||
PP_EXPECT(harness, fake.displayed_path == "D:/Paint/export.png");
|
||||
PP_EXPECT(harness, fake.shared_path == "D:/Paint/demo.ppi");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user