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

Unified Diff: sky/tests/framework/flights-app-pixels.sky

Issue 1034953003: Remove flights example (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/flights/index.sky ('k') | sky/tests/framework/flights-app-pixels-expected.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tests/framework/flights-app-pixels.sky
diff --git a/sky/examples/flights/index.sky b/sky/tests/framework/flights-app-pixels.sky
similarity index 74%
rename from sky/examples/flights/index.sky
rename to sky/tests/framework/flights-app-pixels.sky
index 00f43796567674fbf520f15441c6a180c6c4afcf..5ba9c40060d2a88e7047688182c93822e763a59a 100644
--- a/sky/examples/flights/index.sky
+++ b/sky/tests/framework/flights-app-pixels.sky
@@ -1,4 +1,5 @@
<app>
+ <import src="../resources/run-after-display.sky" />
<style>
* { box-sizing: border-box; }
@@ -9,9 +10,9 @@
app {
display: flex;
flex-direction: column;
- height: 100%;
+ min-height: 100%;
background-color: #494949;
- font-family: sans-serif;
+ font-family: "Helvetica", sans-serif;
font-size: 16px;
color: #2B2B2B;
}
@@ -91,7 +92,6 @@
right: 32px;
max-width: 55%;
box-shadow: 0px 0px 12px 2px rgba(22, 22, 22, 0.4);
- background-color: #b0281a;
background-image: linear-gradient(#E5D658, #DFCF43);
border: 1px solid #AEA477;
padding: 6px;
@@ -99,6 +99,7 @@
display: flex;
align-items: center;
font-size: 0.8em;
+ overflow: hidden;
}
app-toast-header {
@@ -106,6 +107,16 @@
margin-right: 6px;
}
+ app-toast-close-box {
+ position: absolute;
+ top: 3px;
+ right: 3px;
+ width: 1em;
+ overflow: hidden;
+ text-align: center;
+ outline: 1px solid #AEA477;
+ }
+
.tip-icon {
font-weight: bold;
font-size: 24px;
@@ -127,6 +138,7 @@
.route-result {
margin: 16px 16px 0 16px;
+ outline: 1px solid black;
}
.route-title {
@@ -167,13 +179,13 @@
<t>Search</t>
</app-title>
<app-menu-button>
- <img src="images/menu-white.png" class="menu-icon">
+ <img src="resources/menu-white.png" class="menu-icon">
</app-menu-button>
</app-header>
<app-toolbar>
<app-search-input>
<span class="input-icon">
- <img src="/sky/examples/flights/images/magnifying-glass.png" style="width: 16px">
+ <img src="resources/magnifying-glass.png" style="width: 16px">
</span>
<span class="input-text"><t>flights today to dc by price</t></span>
</app-search-input>
@@ -185,12 +197,12 @@
<t>SFO to DCA</t>
</div>
<app-menu-button>
- <img src="images/menu-enabled.png" class="menu-icon-inner">
+ <img src="resources/menu-enabled.png" class="menu-icon-inner">
</app-menu-button>
</app-panel-header>
<app-panel-content class="airline">
<div class="airline-logo">
- <img class="airline-logo-image" src="images/virgin-america.jpg">
+ <img class="airline-logo-image" src="resources/virgin-america.jpg">
</div>
<div class="airline-name">
<t>Virgin America</t>
@@ -201,7 +213,7 @@
</app-panel-content>
<app-panel-content class="airline">
<div class="airline-logo">
- <img class="airline-logo-image" src="images/ba.jpg">
+ <img class="airline-logo-image" src="resources/ba.jpg">
</div>
<div class="airline-name">
<t>British Airways</t>
@@ -212,7 +224,7 @@
</app-panel-content>
<app-panel-content class="airline">
<div class="airline-logo">
- <img class="airline-logo-image" src="images/united.jpg">
+ <img class="airline-logo-image" src="resources/united.jpg">
</div>
<div class="airline-name">
<t>United</t>
@@ -223,7 +235,7 @@
</app-panel-content>
<app-panel-content class="airline">
<div class="airline-logo">
- <img class="airline-logo-image" src="images/delta.jpg">
+ <img class="airline-logo-image" src="resources/delta.jpg">
</div>
<div class="airline-name">
<t>Delta</t>
@@ -239,12 +251,12 @@
<t>SJC to DCA</t>
</div>
<app-menu-button>
- <img src="images/menu-enabled.png" class="menu-icon-inner">
+ <img src="resources/menu-enabled.png" class="menu-icon-inner">
</app-menu-button>
</app-panel-header>
<app-panel-content class="airline">
<div class="airline-logo">
- <img class="airline-logo-image" src="images/virgin-america.jpg">
+ <img class="airline-logo-image" src="resources/virgin-america.jpg">
</div>
<div class="airline-name">
<t>Virgin America</t>
@@ -255,7 +267,7 @@
</app-panel-content>
<app-panel-content class="airline">
<div class="airline-logo">
- <img class="airline-logo-image" src="images/jetblue.jpg">
+ <img class="airline-logo-image" src="resources/jetblue.jpg">
</div>
<div class="airline-name">
<t>jetBlue</t>
@@ -266,7 +278,7 @@
</app-panel-content>
<app-panel-content class="airline">
<div class="airline-logo">
- <img class="airline-logo-image" src="images/united.jpg">
+ <img class="airline-logo-image" src="resources/united.jpg">
</div>
<div class="airline-name">
<t>United</t>
@@ -286,5 +298,41 @@
<app-toast-content>
<t>Flights are <span class="tip-price">$200</span> cheaper tomorrow.</t>
</app-toast-content>
+ <app-toast-close-box>
+ X
+ </app-toast-close-box>
</app-toast>
+ <script>
+ import "dart:sky";
+ import "dart:sky.internals" as internals;
+ import "dart:async";
+
+ var app;
+
+ bool imagesLoaded() {
+ var images = window.document.querySelectorAll('img');
+ for (var i = 0; i < images.length; i++) {
+ if (!images[i].complete)
+ return false;
+ }
+ return true;
+ }
+
+ void checkImagesLoaded() {
+ if (!imagesLoaded()) {
+ new Timer(new Duration(seconds:10), checkImagesLoaded);
+ return;
+ }
+ runAfterDisplay(() {
+ internals.notifyTestComplete("");
+ });
+ }
+ void main() {
+ window.addEventListener("load", (_) {
+ var input = document.querySelector('.input-text');
+ window.getSelection().selectAllChildren(input.firstChild);
+ checkImagesLoaded();
+ });
+ }
+ </script>
</app>
« no previous file with comments | « sky/examples/flights/index.sky ('k') | sky/tests/framework/flights-app-pixels-expected.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698