@@ -6,6 +6,7 @@ onload = function() {
66 body . style . display = 'flex' ;
77
88 var div = document . createElement ( 'div' ) ;
9+ < << << << Upstream , based on origin / master
910 div . setAttribute ( 'style' , 'position:fixed;height:20px;left:0;right:0;background:lightblue' ) ;
1011 body . appendChild ( div ) ;
1112 harness . header = div ;
@@ -54,6 +55,56 @@ onload = function() {
5455 harness . iframe . setAttribute ( 'style' , 'width:100%;height:100%;position:absolute;overflow:auto;top:0px;bottom:0px' ) ;
5556 div2 . appendChild ( harness . iframe ) ;
5657
58+ = === ===
59+ div . setAttribute ( 'style' , 'position:fixed;height:20px;width:100%;background:lightblue' ) ;
60+ body . appendChild ( div ) ;
61+ harness . header = div ;
62+
63+ var div2 = document . createElement ( 'div' ) ;
64+ div2 . setAttribute ( 'style' , 'position:fixed;display:flex;top:20px; bottom:0;width:100%' ) ;
65+ body . appendChild ( div2 ) ;
66+ harness . body = div2 ;
67+
68+ var btn1 = document . createElement ( 'input' ) ;
69+ btn1 . setAttribute ( 'type' , 'radio' ) ;
70+ btn1 . setAttribute ( 'name' , 'view' ) ;
71+ div . appendChild ( btn1 ) ;
72+ btn1 . checked = true ;
73+
74+ var lbl1 = document . createElement ( 'label' ) ;
75+ lbl1 . setAttribute ( 'for' , 'btn1' ) ;
76+ lbl1 . innerHTML = 'PDF'
77+ div . appendChild ( lbl1 ) ;
78+
79+ var btn2 = document . createElement ( 'input' ) ;
80+ btn2 . setAttribute ( 'type' , 'radio' ) ;
81+ btn2 . setAttribute ( 'name' , 'view' ) ;
82+ div . appendChild ( btn2 ) ;
83+
84+ var lbl2 = document . createElement ( 'label' ) ;
85+ lbl2 . setAttribute ( 'for' , 'btn2' ) ;
86+ lbl2 . innerHTML = 'Source'
87+ div . appendChild ( lbl2 ) ;
88+
89+ var btn3 = document . createElement ( 'input' ) ;
90+ btn3 . setAttribute ( 'type' , 'radio' ) ;
91+ btn3 . setAttribute ( 'name' , 'view' ) ;
92+ div . appendChild ( btn3 ) ;
93+
94+ var lbl3 = document . createElement ( 'label' ) ;
95+ lbl3 . setAttribute ( 'for' , 'btn3' ) ;
96+ lbl3 . innerHTML = 'Both'
97+ div . appendChild ( lbl3 ) ;
98+
99+ harness . source = document . createElement ( 'pre' ) ;
100+ harness . source . setAttribute ( 'style' , 'margin-top:0;width:100%;height:100%;position:absolute;top:0px;bottom:0px;overflow:auto' ) ;
101+ div2 . appendChild ( harness . source ) ;
102+
103+ harness . iframe = document . createElement ( 'iframe' ) ;
104+ harness . iframe . setAttribute ( 'style' , 'width:100%;height:100%;position:absolute;overflow:auto;top:0px;bottom:0px' ) ;
105+ div2 . appendChild ( harness . iframe ) ;
106+
107+ > >>> >>> 06e3870 added header and body to test harness
57108 if ( pdf_test_harness . onload ) {
58109 harness . pdf = pdf_test_harness . onload ( harness ) ;
59110 if ( harness . message ) {
@@ -144,4 +195,4 @@ pdf_test_harness = function(pdf) {
144195 this . source . style . display = 'inline-block' ;
145196 }
146197 }
147- }
198+ }
0 commit comments