1 /*
   2  * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package com.sun.javafx.css;
  27 
  28 import com.sun.javafx.FXUnit;
  29 import com.sun.javafx.pgstub.StubToolkit;
  30 import com.sun.javafx.tk.Toolkit;
  31 import javafx.scene.Group;
  32 import javafx.scene.Scene;
  33 import javafx.scene.shape.Rectangle;
  34 import javafx.scene.text.Text;
  35 import javafx.stage.Popup;
  36 import javafx.stage.Stage;
  37 import org.junit.*;
  38 
  39 import static org.junit.Assert.*;
  40 
  41 /**
  42  *
  43  * @author dgrieve
  44  */
  45 public class StyleManagerTest {
  46 
  47     @org.junit.Rule
  48     public final FXUnit fx = new FXUnit();
  49 
  50     public StyleManagerTest() {
  51     }
  52     
  53     @Before
  54     public void setUp() {
  55 //        rect = new Rectangle();
  56 //        rect.setId("rectangle");
  57 //
  58 //        text = new Text();
  59 //        text.setId("text");
  60 //
  61 //        Group group = new Group();
  62 //        group.getChildren().addAll(rect, text);
  63 //
  64 //        scene = new Scene(group);/* {
  65 //            TestWindow window;
  66 //            {
  67 //                window = new TestWindow();
  68 //                window.setScene(HonorDeveloperSettingsTest.this.scene);
  69 //                impl_setWindow(window);
  70 //            }
  71 //        };*/
  72 //        
  73 //        System.setProperty("binary.css", "false");
  74 //        String url = getClass().getResource("HonorDeveloperSettingsTest_UA.css").toExternalForm();
  75 //        StyleManager.getInstance().setDefaultUserAgentStylesheet(url);
  76 //        
  77 //        Stage stage = new Stage();
  78 //        stage.setScene(scene);
  79 //        stage.show();
  80     }
  81     
  82     @Test
  83     public void testMethod_getInstance() {
  84         Scene scene = new Scene(new Group());
  85         StyleManager sm = StyleManager.getInstance();
  86         assertNotNull(sm);
  87     }
  88         
  89 }